OS Manuals

/usr/lib/postgresql/16/bin/pg_rewind

spilo-4 compat package

From spilo-4-compat 4.1.2-r26 (enterprise-packages), captured 2026-11-08 by running pg_rewind --help (exit 0). permalink

pg_rewind resynchronizes a PostgreSQL cluster with another copy of the cluster.

Usage:
  pg_rewind [OPTION]...

Options:
  -c, --restore-target-wal       use restore_command in target configuration to
                                 retrieve WAL files from archives
  -D, --target-pgdata=DIRECTORY  existing data directory to modify
      --source-pgdata=DIRECTORY  source data directory to synchronize with
      --source-server=CONNSTR    source server to synchronize with
  -n, --dry-run                  stop before modifying anything
  -N, --no-sync                  do not wait for changes to be written
                                 safely to disk
  -P, --progress                 write progress messages
  -R, --write-recovery-conf      write configuration for replication
                                 (requires --source-server)
      --config-file=FILENAME     use specified main server configuration
                                 file when running target cluster
      --debug                    write a lot of debug messages
      --no-ensure-shutdown       do not automatically fix unclean shutdown
  -V, --version                  output version information, then exit
  -?, --help                     show this help, then exit

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (13)
OptionDescriptionSource
-c, --restore-target-waluse restore_command in target configuration to retrieve WAL files from archiveshelp
-D, --target-pgdata DIRECTORYexisting data directory to modifyhelp
--source-pgdata DIRECTORYsource data directory to synchronize withhelp
--source-server CONNSTRsource server to synchronize withhelp
-n, --dry-runstop before modifying anythinghelp
-N, --no-syncdo not wait for changes to be written safely to diskhelp
-P, --progresswrite progress messageshelp
-R, --write-recovery-confwrite configuration for replication (requires --source-server)help
--config-file FILENAMEuse specified main server configuration file when running target clusterhelp
--debugwrite a lot of debug messageshelp
--no-ensure-shutdowndo not automatically fix unclean shutdownhelp
-V, --versionoutput version information, then exithelp
-?, --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.