RESET

NameRESET -- restore the value of a run-time parameter to the default value Synopsis RESET configuration_parameter RESET ALL Description RESET restores run-time parameters to their default values. RESET is an alternative spelling for SET configuration_parameter TO DEFAULT Refer to SET for details. The default value is defined as the value that the parameter would have had, if no SET had ever been issued for it in the current session. The actual source of this value might be a compil

Reporting Errors Within the Server

Error, warning, and log messages generated within the server code should be created using ereport, or its older cousin elog. The use of this function is complex enough to require some explanation. There are two required elements for every message: a severity level (ranging from DEBUG to PANIC) and a primary message text. In addition there are optional elements, the most common of which is an error identifier code that follows the SQL spec's SQLSTATE conventions. ereport itself is just a shell f

Reliability

Reliability is an important property of any serious database system, and PostgreSQL does everything possible to guarantee reliable operation. One aspect of reliable operation is that all data recorded by a committed transaction should be stored in a nonvolatile area that is safe from power loss, operating system failure, and hardware failure (except failure of the nonvolatile area itself, of course). Successfully writing the data to the computer's permanent storage (disk drive or equivalent) or

RELEASE SAVEPOINT

NameRELEASE SAVEPOINT -- destroy a previously defined savepoint Synopsis RELEASE [ SAVEPOINT ] savepoint_name Description RELEASE SAVEPOINT destroys a savepoint previously defined in the current transaction. Destroying a savepoint makes it unavailable as a rollback point, but it has no other user visible behavior. It does not undo the effects of commands executed after the savepoint was established. (To do that, see ROLLBACK TO SAVEPOINT.) Destroying a savepoint when it is no longer n

reindexdb

Namereindexdb -- reindex a PostgreSQL database Synopsis reindexdb [connection-option...] [option...] [ --schema | -S schema ] ... [ --table | -t table ] ... [ --index | -i index ] ... [dbname] reindexdb [connection-option...] [option...] --all | -a reindexdb [connection-option...] [option...] --system | -s [dbname] Description reindexdb is a utility for rebuilding indexes in a PostgreSQL database. reindexdb is a wrapper around the SQL command REINDEX. There is no effective difference be

REINDEX

NameREINDEX -- rebuild indexes Synopsis REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name Description REINDEX rebuilds an index using the data stored in the index's table, replacing the old copy of the index. There are several scenarios in which to use REINDEX: An index has become corrupted, and no longer contains valid data. Although in theory this should never happen, in practice indexes can become corrupted due to software bugs or hardware failures. REIND

Registering Event Log on Windows

To register a Windows event log library with the operating system, issue this command: regsvr32 pgsql_library_directory/pgevent.dll This creates registry entries used by the event viewer, under the default event source named PostgreSQL. To specify a different event source name (see event_source), use the /n and /i options: regsvr32 /n /i:event_source_name pgsql_library_directory/pgevent.dll To unregister the event log library from the operating system, issue this command: regsvr32 /u [/i:e

REFRESH MATERIALIZED VIEW

NameREFRESH MATERIALIZED VIEW -- replace the contents of a materialized view Synopsis REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] name [ WITH [ NO ] DATA ] Description REFRESH MATERIALIZED VIEW completely replaces the contents of a materialized view. The old contents are discarded. If WITH DATA is specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state. If WITH NO DATA is specified no new data is generate

Recovery Target Settings

By default, recovery will recover to the end of the WAL log. The following parameters can be used to specify an earlier stopping point. At most one of recovery_target, recovery_target_name, recovery_target_time, or recovery_target_xid can be used; if more than one of these is specified in the configuration file, the last entry will be used. recovery_target = 'immediate' This parameter specifies that recovery should end as soon as a consistent state is reached, i.e. as early as possible. Whe

REASSIGN OWNED

NameREASSIGN OWNED -- change the ownership of database objects owned by a database role Synopsis REASSIGN OWNED BY { old_role | CURRENT_USER | SESSION_USER } [, ...] TO { new_role | CURRENT_USER | SESSION_USER } Description REASSIGN OWNED instructs the system to change the ownership of database objects owned by any of the old_roles to new_role. Parameters old_role The name of a role. The ownership of all the objects within the current database, and of all shared ob