OS Manuals

/usr/bin/pg_resetwal

A sophisticated object-relational DBMS

From postgresql-18 18.6-r7 (os), captured 2026-11-05 by running pg_resetwal --help (exit 0). permalink

Also provided by 11 other package versions
pg_resetwal resets the PostgreSQL write-ahead log.

Usage:
  pg_resetwal [OPTION]... DATADIR

Options:
 [-D, --pgdata=]DATADIR  data directory
  -f, --force            force update to be done even after unclean shutdown or
                         if pg_control values had to be guessed
  -n, --dry-run          no update, just show what would be done
  -V, --version          output version information, then exit
  -?, --help             show this help, then exit

Options to override control file values:
  -c, --commit-timestamp-ids=XID,XID
                                   set oldest and newest transactions bearing
                                   commit timestamp (zero means no change)
  -e, --epoch=XIDEPOCH             set next transaction ID epoch
  -l, --next-wal-file=WALFILE      set minimum starting location for new WAL
  -m, --multixact-ids=MXID,MXID    set next and oldest multitransaction ID
  -o, --next-oid=OID               set next OID
  -O, --multixact-offset=OFFSET    set next multitransaction offset
  -u, --oldest-transaction-id=XID  set oldest transaction ID
  -x, --next-transaction-id=XID    set next transaction ID
      --char-signedness=OPTION     set char signedness to "signed" or "unsigned"
      --wal-segsize=SIZE           size of WAL segments, in megabytes

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (14)
OptionDescriptionSource
-f, --forceforce update to be done even after unclean shutdown or if pg_control values had to be guessedhelp
-n, --dry-runno update, just show what would be donehelp
-V, --versionoutput version information, then exithelp
-?, --helpshow this help, then exithelp
-c, --commit-timestamp-ids XIDset oldest and newest transactions bearing commit timestamp (zero means no change)help
-e, --epoch XIDEPOCHset next transaction ID epochhelp
-l, --next-wal-file WALFILEset minimum starting location for new WALhelp
-m, --multixact-ids MXIDset next and oldest multitransaction IDhelp
-o, --next-oid OIDset next OIDhelp
-O, --multixact-offset OFFSETset next multitransaction offsethelp
-u, --oldest-transaction-id XIDset oldest transaction IDhelp
-x, --next-transaction-id XIDset next transaction IDhelp
--char-signedness OPTIONset char signedness to "signed" or "unsigned"help
--wal-segsize SIZEsize of WAL segments, in megabyteshelp

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