ALTER USER MAPPING

NameALTER USER MAPPING -- change the definition of a user mapping Synopsis ALTER USER MAPPING FOR { user_name | USER | CURRENT_USER | SESSION_USER | PUBLIC } SERVER server_name OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) Description ALTER USER MAPPING changes the definition of a user mapping. The owner of a foreign server can alter user mappings for that server for any user. Also, a user can alter a user mapping for their own user name if USAGE privilege on the

Monitoring: Disk Full Failure

The most important disk monitoring task of a database administrator is to make sure the disk doesn't become full. A filled data disk will not result in data corruption, but it might prevent useful activity from occurring. If the disk holding the WAL files grows full, database server panic and consequent shutdown might occur. If you cannot free up additional space on the disk by deleting other things, you can move some of the database files to other file systems by making use of tablespaces. See

Server Configuration: Developer Options

The following parameters are intended for work on the PostgreSQL source code, and in some cases to assist with recovery of severely damaged databases. There should be no reason to use them on a production database. As such, they have been excluded from the sample postgresql.conf file. Note that many of these parameters require special source compilation flags to work at all. allow_system_table_mods (boolean) Allows modification of the structure of system tables. This is used by initdb. This

PREPARE

NamePREPARE -- prepare a statement for execution Synopsis PREPARE name [ ( data_type [, ...] ) ] AS statement Description PREPARE creates a prepared statement. A prepared statement is a server-side object that can be used to optimize performance. When the PREPARE statement is executed, the specified statement is parsed, analyzed, and rewritten. When an EXECUTE command is subsequently issued, the prepared statement is planned and executed. This division of labor avoids repetitive parse

DROP TEXT SEARCH CONFIGURATION

NameDROP TEXT SEARCH CONFIGURATION -- remove a text search configuration Synopsis DROP TEXT SEARCH CONFIGURATION [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP TEXT SEARCH CONFIGURATION drops an existing text search configuration. To execute this command you must be the owner of the configuration. Parameters IF EXISTS Do not throw an error if the text search configuration does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of

sslinfo

The sslinfo module provides information about the SSL certificate that the current client provided when connecting to PostgreSQL. The module is useless (most functions will return NULL) if the current connection does not use SSL. This extension won't build at all unless the installation was configured with --with-openssl. F.37.1. Functions Provided ssl_is_used() returns boolean Returns TRUE if current connection to server uses SSL, and FALSE otherwise. ssl_version() returns

Routine Reindexing

In some situations it is worthwhile to rebuild indexes periodically with the REINDEX command or a series of individual rebuilding steps. B-tree index pages that have become completely empty are reclaimed for re-use. However, there is still a possibility of inefficient use of space: if all but a few index keys on a page have been deleted, the page remains allocated. Therefore, a usage pattern in which most, but not all, keys in each range are eventually deleted will see poor use of space. For su

Catalogs: pg_replication_origin

The pg_replication_origin catalog contains all replication origins created. For more on replication origins see Chapter 48. Table 50-40. pg_replication_origin Columns Name Type References Description roident Oid A unique, cluster-wide identifier for the replication origin. Should never leave the system. roname text The external, user defined, name of a replication origin. Prev Next pg_range Up pg_rewrite

ALTER SEQUENCE

NameALTER SEQUENCE -- change the definition of a sequence generator Synopsis ALTER SEQUENCE [ IF EXISTS ] name [ INCREMENT [ BY ] increment ] [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ] [ START [ WITH ] start ] [ RESTART [ [ WITH ] restart ] ] [ CACHE cache ] [ [ NO ] CYCLE ] [ OWNED BY { table_name.column_name | NONE } ] ALTER SEQUENCE [ IF EXISTS ] name OWNER TO { new_owner | CURRENT_USER | SESSION_USER } ALTER SEQUENCE [ IF EXISTS ] name

createdb

Namecreatedb -- create a new PostgreSQL database Synopsis createdb [connection-option...] [option...] [dbname [description]] Description createdb creates a new PostgreSQL database. Normally, the database user who executes this command becomes the owner of the new database. However, a different owner can be specified via the -O option, if the executing user has appropriate privileges. createdb is a wrapper around the SQL command CREATE DATABASE. There is no effective difference between c