postgres_fdw

The postgres_fdw module provides the foreign-data wrapper postgres_fdw, which can be used to access data stored in external PostgreSQL servers. The functionality provided by this module overlaps substantially with the functionality of the older dblink module. But postgres_fdw provides more transparent and standards-compliant syntax for accessing remote tables, and can give better performance in many cases. To prepare for remote access using postgres_fdw: Install the postgres_fdw extension usin

PostgreSQL User Account

As with any server daemon that is accessible to the outside world, it is advisable to run PostgreSQL under a separate user account. This user account should only own the data that is managed by the server, and should not be shared with other daemons. (For example, using the user nobody is a bad idea.) It is not advisable to install executables owned by this user because compromised systems could then modify their own binaries. To add a Unix user account to your system, look for a command userad

PostgreSQL Error Codes

All messages emitted by the PostgreSQL server are assigned five-character error codes that follow the SQL standard's conventions for "SQLSTATE" codes. Applications that need to know which error condition has occurred should usually test the error code, rather than looking at the textual error message. The error codes are less likely to change across PostgreSQL releases, and also are not subject to change due to localization of error messages. Note that some, but not all, of the error codes prod

postgres

Namepostgres -- PostgreSQL database server Synopsis postgres [option...] Description postgres is the PostgreSQL database server. In order for a client application to access a database it connects (over a network or locally) to a running postgres instance. The postgres instance then starts a separate server process to handle the connection. One postgres instance always manages the data of exactly one database cluster. A database cluster is a collection of databases that is stored at a co

pg_xlogdump

Namepg_xlogdump -- display a human-readable rendering of the write-ahead log of a PostgreSQL database cluster Synopsis pg_xlogdump [option...] [startseg [endseg] ] Description pg_xlogdump displays the write-ahead log (WAL) and is mainly useful for debugging or educational purposes. This utility can only be run by the user who installed the server, because it requires read-only access to the data directory. Options The following command-line options control the location and format of

pg_visibility

The pg_visibility module provides a means for examining the visibility map (VM) and page-level visibility information. It also provides functions to check the integrity of the visibility map and to force it to be rebuilt. Three different bits are used to store information about page-level visibility. The all-visible bit in the visibility map indicates that every tuple on a given page of a relation is visible to every current transaction. The all-frozen bit in the visibility map indicates that e

pg_upgrade

Namepg_upgrade -- upgrade a PostgreSQL server instance Synopsis pg_upgrade -b oldbindir -B newbindir -d olddatadir -D newdatadir [option...] Description pg_upgrade (formerly called pg_migrator) allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version without the data dump/reload typically required for major version upgrades, e.g. from 8.4.7 to the current major release of PostgreSQL. It is not required for minor version upgrades, e.g. from 9.0.1 to

pg_trgm

The pg_trgm module provides functions and operators for determining the similarity of alphanumeric text based on trigram matching, as well as index operator classes that support fast searching for similar strings. F.31.1. Trigram (or Trigraph) Concepts A trigram is a group of three consecutive characters taken from a string. We can measure the similarity of two strings by counting the number of trigrams they share. This simple idea turns out to be very effective for measuring the similarity of

pg_test_timing

Namepg_test_timing -- measure timing overhead Synopsis pg_test_timing [option...] Description pg_test_timing is a tool to measure the timing overhead on your system and confirm that the system time never moves backwards. Systems that are slow to collect timing data can give less accurate EXPLAIN ANALYZE results. Options pg_test_timing accepts the following command-line options: -d duration--duration=duration Specifies the test duration, in seconds. Longer durations give slightly

pg_test_fsync

Namepg_test_fsync -- determine fastest wal_sync_method for PostgreSQL Synopsis pg_test_fsync [option...] Description pg_test_fsync is intended to give you a reasonable idea of what the fastest wal_sync_method is on your specific system, as well as supplying diagnostic information in the event of an identified I/O problem. However, differences shown by pg_test_fsync might not make any significant difference in real database throughput, especially since many database servers are not speed