pg_resetwal
resets write-ahead log and control information
TLDR
Reset WAL (dry run)
$ pg_resetwal -n [data_dir]
Reset WAL$ pg_resetwal [data_dir]
Force reset$ pg_resetwal -f [data_dir]
SYNOPSIS
pg_resetwal [options] [-D] datadir
DESCRIPTION
pg_resetwal resets write-ahead log and control information. Last resort recovery when WAL is corrupted. May cause data loss. Server must be stopped.
PARAMETERS
-D, --pgdata dir
Data directory.-n, --dry-run
Show what would be done.-f, --force
Force reset.-e xid
Set next transaction ID.-l walfile
Force minimum WAL starting location.
CAVEATS
Use only as last resort. May cause data loss. Server must be stopped.
SEE ALSO
pg_controldata(1), pg_rewind(1)
