OS Manuals

/usr/bin/pg_resetwal

A sophisticated object-relational DBMS

From postgresql-15 15.6-r5 (os), captured 2026-11-05 by running pg_resetwal --help (exit 0). permalink

pg_resetwal resets the PostgreSQL write-ahead log.

Usage:
  pg_resetwal [OPTION]... DATADIR

Options:
  -c, --commit-timestamp-ids=XID,XID
                                   set oldest and newest transactions bearing
                                   commit timestamp (zero means no change)
 [-D, --pgdata=]DATADIR            data directory
  -e, --epoch=XIDEPOCH             set next transaction ID epoch
  -f, --force                      force update to be done
  -l, --next-wal-file=WALFILE      set minimum starting location for new WAL
  -m, --multixact-ids=MXID,MXID    set next and oldest multitransaction ID
  -n, --dry-run                    no update, just show what would be done
  -o, --next-oid=OID               set next OID
  -O, --multixact-offset=OFFSET    set next multitransaction offset
  -u, --oldest-transaction-id=XID  set oldest transaction ID
  -V, --version                    output version information, then exit
  -x, --next-transaction-id=XID    set next transaction ID
      --wal-segsize=SIZE           size of WAL segments, in megabytes
  -?, --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, --commit-timestamp-ids XIDset oldest and newest transactions bearing commit timestamp (zero means no change)help
-e, --epoch XIDEPOCHset next transaction ID epochhelp
-f, --forceforce update to be donehelp
-l, --next-wal-file WALFILEset minimum starting location for new WALhelp
-m, --multixact-ids MXIDset next and oldest multitransaction IDhelp
-n, --dry-runno update, just show what would be donehelp
-o, --next-oid OIDset next OIDhelp
-O, --multixact-offset OFFSETset next multitransaction offsethelp
-u, --oldest-transaction-id XIDset oldest transaction IDhelp
-V, --versionoutput version information, then exithelp
-x, --next-transaction-id XIDset next transaction IDhelp
--wal-segsize SIZEsize of WAL segments, in megabyteshelp
-?, --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.