OS Manuals

/usr/bin/pg_standby

Extension modules distributed with PostgreSQL

From postgresql-12-contrib 12.18-r4 (os), captured 2026-11-05 by running pg_standby --help (exit 0). permalink

pg_standby allows PostgreSQL warm standby servers to be configured.

Usage:
  pg_standby [OPTION]... ARCHIVELOCATION NEXTWALFILE XLOGFILEPATH [RESTARTWALFILE]

Options:
  -c                 copy file from archive (default)
  -d                 generate lots of debugging output (testing only)
  -k NUMFILESTOKEEP  if RESTARTWALFILE is not used, remove files prior to limit
                     (0 keeps all)
  -l                 does nothing; use of link is now deprecated
  -r MAXRETRIES      max number of times to retry, with progressive wait
                     (default=3)
  -s SLEEPTIME       seconds to wait between file checks (min=1, max=60,
                     default=5)
  -t TRIGGERFILE     trigger file to initiate failover (no default)
  -V, --version      output version information, then exit
  -w MAXWAITTIME     max seconds to wait for a file (0=no limit) (default=0)
  -?, --help         show this help, then exit

Main intended use as restore_command in postgresql.conf:
  restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %f %p %r'
e.g.
  restore_command = 'pg_standby /mnt/server/archiverdir %f %p %r'

Report bugs to <pgsql-bugs@lists.postgresql.org>.
Options (10)
OptionDescriptionSource
-ccopy file from archive (default)help
-dgenerate lots of debugging output (testing only)help
-k NUMFILESTOKEEPif RESTARTWALFILE is not used, remove files prior to limit (0 keeps all)help
-ldoes nothing;help
-r MAXRETRIESmax number of times to retry, with progressive wait (default=3)help
-s SLEEPTIMEseconds to wait between file checks (min=1, max=60, default=5)help
-t TRIGGERFILEtrigger file to initiate failover (no default)help
-V, --versionoutput version information, then exithelp
-w MAXWAITTIMEmax seconds to wait for a file (0=no limit) (default=0)help
-?, --helpshow this help, then exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.