WAL Configuration

There are several WAL-related configuration parameters that affect database performance. This section explains their use. Consult Chapter 19 for general information about setting server configuration parameters. Checkpoints are points in the sequence of transactions at which it is guaranteed that the heap and index data files have been updated with all information written before that checkpoint. At checkpoint time, all dirty data pages are flushed to disk and a special checkpoint record is writ

Server Configuration: Error Handling

exit_on_error (boolean) If true, any error will terminate the current session. By default, this is set to false, so that only FATAL errors will terminate the session. restart_after_crash (boolean) When set to true, which is the default, PostgreSQL will automatically reinitialize after a backend crash. Leaving this value set to true is normally the best way to maximize the availability of the database. However, in some circumstances, such as when PostgreSQL is being invoked by clusterware,

DROP CONVERSION

NameDROP CONVERSION -- remove a conversion Synopsis DROP CONVERSION [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP CONVERSION removes a previously defined conversion. To be able to drop a conversion, you must own the conversion. Parameters IF EXISTS Do not throw an error if the conversion does not exist. A notice is issued in this case. name The name of the conversion. The conversion name can be schema-qualified. CASCADERESTRICT These key words do not have any e

chkpass

This module implements a data type chkpass that is designed for storing encrypted passwords. Each password is automatically converted to encrypted form upon entry, and is always stored encrypted. To compare, simply compare against a clear text password and the comparison function will encrypt it before comparing. There are provisions in the code to report an error if the password is determined to be easily crackable. However, this is currently just a stub that does nothing. If you precede an in

Catalogs: pg_foreign_table

The catalog pg_foreign_table contains auxiliary information about foreign tables. A foreign table is primarily represented by a pg_class entry, just like a regular table. Its pg_foreign_table entry contains the information that is pertinent only to foreign tables and not any other kind of relation. Table 50-25. pg_foreign_table Columns Name Type References Description ftrelid oid pg_class.oid OID of the pg_class entry for this foreign table ftserver oid pg_foreign_server.oid OID of the foreig

SET ROLE

NameSET ROLE -- set the current user identifier of the current session Synopsis SET [ SESSION | LOCAL ] ROLE role_name SET [ SESSION | LOCAL ] ROLE NONE RESET ROLE Description This command sets the current user identifier of the current SQL session to be role_name. The role name can be written as either an identifier or a string literal. After SET ROLE, permissions checking for SQL commands is carried out as though the named role were the one that had logged in originally. The specifi

Partial Indexes

A partial index is an index built over a subset of a table; the subset is defined by a conditional expression (called the predicate of the partial index). The index contains entries only for those table rows that satisfy the predicate. Partial indexes are a specialized feature, but there are several situations in which they are useful. One major reason for using a partial index is to avoid indexing common values. Since a query searching for a common value (one that accounts for more than a few

DROP POLICY

NameDROP POLICY -- remove a row level security policy from a table Synopsis DROP POLICY [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ] Description DROP POLICY removes the specified policy from the table. Note that if the last policy is removed for a table and the table still has row level security enabled via ALTER TABLE, then the default-deny policy will be used. ALTER TABLE ... DISABLE ROW LEVEL SECURITY can be used to disable row level security for a table, whether policie

DROP SERVER

NameDROP SERVER -- remove a foreign server descriptor Synopsis DROP SERVER [ IF EXISTS ] name [ CASCADE | RESTRICT ] Description DROP SERVER removes an existing foreign server descriptor. To execute this command, the current user must be the owner of the server. Parameters IF EXISTS Do not throw an error if the server does not exist. A notice is issued in this case. name The name of an existing server. CASCADE Automatically drop objects that depend on the server (such as user

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