LinuxCommandLibrary

pg_archivecleanup

removes old WAL archive files no longer needed by standby servers

TLDR

Clean old WAL files

$ pg_archivecleanup [archive_dir] [oldest_kept_wal]
copy
Dry run
$ pg_archivecleanup -n [archive_dir] [oldest_kept_wal]
copy
Clean with extension
$ pg_archivecleanup -x .gz [archive_dir] [oldest_kept_wal]
copy

SYNOPSIS

pg_archivecleanup [options] archivelocation oldestkeptwalfile

DESCRIPTION

pg_archivecleanup removes old WAL archive files no longer needed by standby servers. Typically used as archivecleanupcommand in recovery.conf. Maintains WAL archive size.

PARAMETERS

-d

Debug output.
-n
Dry run (show what would be removed).
-x extension
File extension for compressed files.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community