{"Entry":{"collection":"tool","key":"pg-archivecleanup","name":"pg_archivecleanup","aliases":["pg_archivecleanup"],"metadata":{"aliases":["pg_archivecleanup"],"category":"Server applications","content_hash":"fd7e17ef53e64339c1e0732987939789b3737b7d1d2b704006363f6d77c43f3b","imported_at":"2026-09-30T00:40:34.02289+08:00","name":"pg_archivecleanup","name_zh":"","slug":"pg-archivecleanup","summary":"pg_archivecleanup — clean up PostgreSQL WAL archive files"}},"Definition":{"Collection":"tool","Key":"pg-archivecleanup","SourceDatabase":"center","Version":"18","SourceTable":"command_tool","SourceKey":"pg-archivecleanup","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","Facts":{"comparison_data":{"environment":[],"options":[{"description":"Remove backup history files as well. See Section 25.3.2 for details about backup history files.","names":["-b","--clean-backup-history"],"signature":"-b --clean-backup-history"},{"description":"Print lots of debug logging output on stderr .","names":["-d","--debug"],"signature":"-d --debug"},{"description":"Print the names of the files that would have been removed on stdout (performs a dry run).","names":["-n","--dry-run"],"signature":"-n --dry-run"},{"description":"Print the pg_archivecleanup version and exit.","names":["-V","--version"],"signature":"-V --version"},{"description":"Provide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: -x .gz .","names":["-x extension","--strip-extension= extension"],"signature":"-x extension --strip-extension= extension"},{"description":"Show help about pg_archivecleanup command line arguments, and exit.","names":["-?","--help"],"signature":"-? --help"}],"synopsis":["pg_archivecleanup [ option ...] archivelocation oldestkeptwalfile"]},"comparison_hash":"18d66c08cf423bd426b6c3ea916de5ab0a2b1ae3ecbe75bc0b1efbbf13ec32db","description":["pg_archivecleanup — clean up PostgreSQL WAL archive files"],"environment":[],"facts":[{"label":"Documented executable","value":"pg_archivecleanup"},{"label":"Executable version","value":"18.6"},{"label":"Reference inventory","value":"Server applications"},{"label":"Option definition groups","value":"6"}],"manual_html":"\u003cdiv\u003e\u003cdiv class=\"refentry\" id=\"PGARCHIVECLEANUP\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\u003c/div\u003e\n\u003cdiv class=\"refnamediv\"\u003e\n\u003ch2\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_archivecleanup — clean up \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e WAL archive files\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsynopsisdiv\"\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv class=\"cmdsynopsis\"\u003e\n\u003cp id=\"id-1.9.5.4.4.1\"\u003e\u003ccode class=\"command\"\u003epg_archivecleanup\u003c/code\u003e [\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e...] \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.5\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is designed to be used as an \u003ccode class=\"literal\"\u003earchive_cleanup_command\u003c/code\u003e to clean up WAL file archives when running as a standby server (see \u003ca class=\"xref\" href=\"/docs/18/warm-standby.html\" title=\"26.2. Log-Shipping Standby Servers\"\u003eSection 26.2\u003c/a\u003e). \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e can also be used as a standalone program to clean WAL file archives.\u003c/p\u003e\n\u003cp\u003eTo configure a standby server to use \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e, put this into its \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e configuration file:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003earchive_cleanup_command = 'pg_archivecleanup \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e %r'\n\u003c/pre\u003e\n\u003cp\u003ewhere \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is the directory from which WAL segment files should be removed.\u003c/p\u003e\n\u003cp\u003eWhen used within \u003ca class=\"xref\" href=\"/docs/18/runtime-config-wal.html#GUC-ARCHIVE-CLEANUP-COMMAND\"\u003earchive_cleanup_command\u003c/a\u003e, all WAL files logically preceding the value of the \u003ccode class=\"literal\"\u003e%r\u003c/code\u003e argument will be removed from \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. This minimizes the number of files that need to be retained, while preserving crash-restart capability. Use of this parameter is appropriate if the \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a transient staging area for this particular standby server, but \u003cspan class=\"emphasis\"\u003e\u003cem\u003enot\u003c/em\u003e\u003c/span\u003e when the \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is intended as a long-term WAL archive area, or when multiple standby servers are recovering from the same archive location.\u003c/p\u003e\n\u003cp\u003eWhen used as a standalone program all WAL files logically preceding the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e will be removed from \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. In this mode, if you specify a \u003ccode class=\"filename\"\u003e.partial\u003c/code\u003e or \u003ccode class=\"filename\"\u003e.backup\u003c/code\u003e file name, then only the file prefix will be used as the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e. This treatment of \u003ccode class=\"filename\"\u003e.backup\u003c/code\u003e file name allows you to remove all WAL files archived prior to a specific base backup without error. For example, the following example will remove all files older than WAL file name \u003ccode class=\"filename\"\u003e000000010000003700000010\u003c/code\u003e:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003epg_archivecleanup -d archive 000000010000003700000010.00000020.backup\n\npg_archivecleanup:  keep WAL file \"archive/000000010000003700000010\" and later\npg_archivecleanup:  removing file \"archive/00000001000000370000000F\"\npg_archivecleanup:  removing file \"archive/00000001000000370000000E\"\n\u003c/pre\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e assumes that \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a directory readable and writable by the server-owning user.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e accepts the following command-line arguments:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--clean-backup-history\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eRemove backup history files as well. See \u003ca class=\"xref\" href=\"/docs/18/continuous-archiving.html#BACKUP-BASE-BACKUP\" title=\"25.3.2. Making a Base Backup\"\u003eSection 25.3.2\u003c/a\u003e for details about backup history files.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-d\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--debug\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint lots of debug logging output on \u003ccode class=\"filename\"\u003estderr\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-n\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--dry-run\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the names of the files that would have been removed on \u003ccode class=\"filename\"\u003estdout\u003c/code\u003e (performs a dry run).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-x \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--strip-extension=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eProvide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: \u003ccode class=\"literal\"\u003e-x .gz\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cp\u003eThe environment variable \u003ccode class=\"envar\"\u003ePG_COLOR\u003c/code\u003e specifies whether to use color in diagnostic messages. Possible values are \u003ccode class=\"literal\"\u003ealways\u003c/code\u003e, \u003ccode class=\"literal\"\u003eauto\u003c/code\u003e and \u003ccode class=\"literal\"\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is designed to work with \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 8.0 and later when used as a standalone utility, or with \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 9.0 and later when used as an archive cleanup command.\u003c/p\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is written in C and has an easy-to-modify source code, with specifically designated sections to modify for your own needs\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.9\"\u003e\n\u003ch2\u003eExamples\u003c/h2\u003e\n\u003cp\u003eOn Linux or Unix systems, you might use:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003earchive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2\u0026gt;\u0026gt;cleanup.log'\n\u003c/pre\u003e\n\u003cp\u003ewhere the archive directory is physically located on the standby server, so that the \u003ccode class=\"varname\"\u003earchive_command\u003c/code\u003e is accessing it across NFS, but the files are local to the standby. This will:\u003c/p\u003e\n\u003cdiv class=\"itemizedlist\"\u003e\n\u003cul class=\"itemizedlist\"\u003e\n\u003cli class=\"listitem\"\u003e\n\u003cp\u003eproduce debugging output in \u003ccode class=\"filename\"\u003ecleanup.log\u003c/code\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli class=\"listitem\"\u003e\n\u003cp\u003eremove no-longer-needed files from the archive directory\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","manual_path":"pgarchivecleanup.html","options":[{"description":"Remove backup history files as well. See Section 25.3.2 for details about backup history files.","names":["-b","--clean-backup-history"],"signature":"-b --clean-backup-history","source_url":"/docs/18/pgarchivecleanup.html","summary":"Remove backup history files as well. See Section 25.3.2 for details about backup history files."},{"description":"Print lots of debug logging output on stderr .","names":["-d","--debug"],"signature":"-d --debug","source_url":"/docs/18/pgarchivecleanup.html","summary":"Print lots of debug logging output on stderr ."},{"description":"Print the names of the files that would have been removed on stdout (performs a dry run).","names":["-n","--dry-run"],"signature":"-n --dry-run","source_url":"/docs/18/pgarchivecleanup.html","summary":"Print the names of the files that would have been removed on stdout (performs a dry run)."},{"description":"Print the pg_archivecleanup version and exit.","names":["-V","--version"],"signature":"-V --version","source_url":"/docs/18/pgarchivecleanup.html","summary":"Print the pg_archivecleanup version and exit."},{"description":"Provide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: -x .gz .","names":["-x extension","--strip-extension= extension"],"signature":"-x extension --strip-extension= extension","source_url":"/docs/18/pgarchivecleanup.html","summary":"Provide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: -x .gz ."},{"description":"Show help about pg_archivecleanup command line arguments, and exit.","names":["-?","--help"],"signature":"-? --help","source_url":"/docs/18/pgarchivecleanup.html","summary":"Show help about pg_archivecleanup command line arguments, and exit."}],"related":[],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[],"signature":"pg_archivecleanup [ option ...] archivelocation oldestkeptwalfile","sources":[{"anchor":"","file":"pgarchivecleanup.html","label":"18.6 English manual · pgarchivecleanup.html","sha256":"430282b0bbc63a05afa75dce3a9f5abd25be1c155de79c0274537e341914d7b4","url":"/docs/18/pgarchivecleanup.html"},{"anchor":"","file":"reference-server.html","label":"Server applications inventory","sha256":"e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3","url":"/docs/18/reference-server.html"}],"synopsis":["pg_archivecleanup [ option ...] archivelocation oldestkeptwalfile"],"tables":[{"columns":[{"key":"signature","label":"Option and arguments"},{"key":"summary","label":"Description"}],"key":"options","rows":[{"signature":{"text":"-b --clean-backup-history","url":"/docs/18/pgarchivecleanup.html"},"summary":"Remove backup history files as well. See Section 25.3.2 for details about backup history files."},{"signature":{"text":"-d --debug","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print lots of debug logging output on stderr ."},{"signature":{"text":"-n --dry-run","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print the names of the files that would have been removed on stdout (performs a dry run)."},{"signature":{"text":"-V --version","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print the pg_archivecleanup version and exit."},{"signature":{"text":"-x extension --strip-extension= extension","url":"/docs/18/pgarchivecleanup.html"},"summary":"Provide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: -x .gz ."},{"signature":{"text":"-? --help","url":"/docs/18/pgarchivecleanup.html"},"summary":"Show help about pg_archivecleanup command line arguments, and exit."}],"title":"Documented options"}]},"ManualEvidence":{"manual_path":"pgarchivecleanup.html","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.6","major":"18","manifest":{"index":"index.html","major":"18","pages":1148,"pdf":{"A4":{"built_at":"2026-09-26","bytes":15865106,"pages":3154,"sha256":"19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190","url":"/files/documentation/pdf/18/postgresql-18-A4.pdf"},"US":{"built_at":"2026-09-26","bytes":15748059,"pages":3328,"sha256":"facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319","url":"/files/documentation/pdf/18/postgresql-18-US.pdf"}},"release":"18.6","source_mode":"en SGML built with pinned official archive","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","svg_assets":3,"tree":"18"},"ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"anchor":"","file":"pgarchivecleanup.html","label":"18.6 English manual · pgarchivecleanup.html","sha256":"430282b0bbc63a05afa75dce3a9f5abd25be1c155de79c0274537e341914d7b4","url":"/docs/18/pgarchivecleanup.html"},{"anchor":"","file":"reference-server.html","label":"Server applications inventory","sha256":"e9f8bbcc8e3641fadd1d20991e8aad6b532155b786ba5a1b7b364ec4f1a5bef3","url":"/docs/18/reference-server.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"tool","Key":"pg-archivecleanup","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_archivecleanup","Summary":"pg_archivecleanup — clean up PostgreSQL WAL archive files","BodyHTML":"\u003cdiv\u003e\u003cdiv id=\"PGARCHIVECLEANUP\"\u003e\n\u003cdiv\u003e\u003c/div\u003e\n\u003cdiv\u003e\n\u003ch2\u003e\u003cspan\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_archivecleanup — clean up \u003cspan\u003ePostgreSQL\u003c/span\u003e WAL archive files\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv\u003e\n\u003cp id=\"id-1.9.5.4.4.1\"\u003e\u003ccode\u003epg_archivecleanup\u003c/code\u003e [\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e...] \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e \u003cem\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.4.5\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e is designed to be used as an \u003ccode\u003earchive_cleanup_command\u003c/code\u003e to clean up WAL file archives when running as a standby server (see \u003ca href=\"/docs/18/warm-standby.html\" rel=\"nofollow\"\u003eSection 26.2\u003c/a\u003e). \u003cspan\u003epg_archivecleanup\u003c/span\u003e can also be used as a standalone program to clean WAL file archives.\u003c/p\u003e\n\u003cp\u003eTo configure a standby server to use \u003cspan\u003epg_archivecleanup\u003c/span\u003e, put this into its \u003ccode\u003epostgresql.conf\u003c/code\u003e configuration file:\u003c/p\u003e\n\u003cpre\u003earchive_cleanup_command = \u0026#39;pg_archivecleanup \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e %r\u0026#39;\n\u003c/pre\u003e\n\u003cp\u003ewhere \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is the directory from which WAL segment files should be removed.\u003c/p\u003e\n\u003cp\u003eWhen used within \u003ca href=\"/docs/18/runtime-config-wal.html#GUC-ARCHIVE-CLEANUP-COMMAND\" rel=\"nofollow\"\u003earchive_cleanup_command\u003c/a\u003e, all WAL files logically preceding the value of the \u003ccode\u003e%r\u003c/code\u003e argument will be removed from \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. This minimizes the number of files that need to be retained, while preserving crash-restart capability. Use of this parameter is appropriate if the \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a transient staging area for this particular standby server, but \u003cspan\u003e\u003cem\u003enot\u003c/em\u003e\u003c/span\u003e when the \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is intended as a long-term WAL archive area, or when multiple standby servers are recovering from the same archive location.\u003c/p\u003e\n\u003cp\u003eWhen used as a standalone program all WAL files logically preceding the \u003cem\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e will be removed from \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. In this mode, if you specify a \u003ccode\u003e.partial\u003c/code\u003e or \u003ccode\u003e.backup\u003c/code\u003e file name, then only the file prefix will be used as the \u003cem\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e. This treatment of \u003ccode\u003e.backup\u003c/code\u003e file name allows you to remove all WAL files archived prior to a specific base backup without error. For example, the following example will remove all files older than WAL file name \u003ccode\u003e000000010000003700000010\u003c/code\u003e:\u003c/p\u003e\n\u003cpre\u003epg_archivecleanup -d archive 000000010000003700000010.00000020.backup\n\npg_archivecleanup:  keep WAL file \u0026#34;archive/000000010000003700000010\u0026#34; and later\npg_archivecleanup:  removing file \u0026#34;archive/00000001000000370000000F\u0026#34;\npg_archivecleanup:  removing file \u0026#34;archive/00000001000000370000000E\u0026#34;\n\u003c/pre\u003e\n\u003cp\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e assumes that \u003cem\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a directory readable and writable by the server-owning user.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.4.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e accepts the following command-line arguments:\u003c/p\u003e\n\u003cdiv\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--clean-backup-history\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eRemove backup history files as well. See \u003ca href=\"/docs/18/continuous-archiving.html#BACKUP-BASE-BACKUP\" rel=\"nofollow\"\u003eSection 25.3.2\u003c/a\u003e for details about backup history files.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-d\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--debug\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint lots of debug logging output on \u003ccode\u003estderr\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-n\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--dry-run\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the names of the files that would have been removed on \u003ccode\u003estdout\u003c/code\u003e (performs a dry run).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan\u003epg_archivecleanup\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-x \u003cem\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--strip-extension=\u003cem\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eProvide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: \u003ccode\u003e-x .gz\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan\u003epg_archivecleanup\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.4.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cp\u003eThe environment variable \u003ccode\u003ePG_COLOR\u003c/code\u003e specifies whether to use color in diagnostic messages. Possible values are \u003ccode\u003ealways\u003c/code\u003e, \u003ccode\u003eauto\u003c/code\u003e and \u003ccode\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.4.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e is designed to work with \u003cspan\u003ePostgreSQL\u003c/span\u003e 8.0 and later when used as a standalone utility, or with \u003cspan\u003ePostgreSQL\u003c/span\u003e 9.0 and later when used as an archive cleanup command.\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003epg_archivecleanup\u003c/span\u003e is written in C and has an easy-to-modify source code, with specifically designated sections to modify for your own needs\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"id-1.9.5.4.9\"\u003e\n\u003ch2\u003eExamples\u003c/h2\u003e\n\u003cp\u003eOn Linux or Unix systems, you might use:\u003c/p\u003e\n\u003cpre\u003earchive_cleanup_command = \u0026#39;pg_archivecleanup -d /mnt/standby/archive %r 2\u0026gt;\u0026gt;cleanup.log\u0026#39;\n\u003c/pre\u003e\n\u003cp\u003ewhere the archive directory is physically located on the standby server, so that the \u003ccode\u003earchive_command\u003c/code\u003e is accessing it across NFS, but the files are local to the standby. This will:\u003c/p\u003e\n\u003cdiv\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003eproduce debugging output in \u003ccode\u003ecleanup.log\u003c/code\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eremove no-longer-needed files from the archive directory\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","SourceRevision":"ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8","ContentHash":"399bcf299e5d47c7090594f0118dc925563a2059001760afb4c5c83f65684cfd","Payload":{"description":["pg_archivecleanup — clean up PostgreSQL WAL archive files"],"manual_html":"\u003cdiv\u003e\u003cdiv class=\"refentry\" id=\"PGARCHIVECLEANUP\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\u003c/div\u003e\n\u003cdiv class=\"refnamediv\"\u003e\n\u003ch2\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003epg_archivecleanup — clean up \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e WAL archive files\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsynopsisdiv\"\u003e\n\u003ch2\u003eSynopsis\u003c/h2\u003e\n\u003cdiv class=\"cmdsynopsis\"\u003e\n\u003cp id=\"id-1.9.5.4.4.1\"\u003e\u003ccode class=\"command\"\u003epg_archivecleanup\u003c/code\u003e [\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e...] \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.5\"\u003e\n\u003ch2\u003eDescription\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is designed to be used as an \u003ccode class=\"literal\"\u003earchive_cleanup_command\u003c/code\u003e to clean up WAL file archives when running as a standby server (see \u003ca class=\"xref\" href=\"/docs/18/warm-standby.html\" title=\"26.2. Log-Shipping Standby Servers\"\u003eSection 26.2\u003c/a\u003e). \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e can also be used as a standalone program to clean WAL file archives.\u003c/p\u003e\n\u003cp\u003eTo configure a standby server to use \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e, put this into its \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e configuration file:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003earchive_cleanup_command = 'pg_archivecleanup \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e %r'\n\u003c/pre\u003e\n\u003cp\u003ewhere \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is the directory from which WAL segment files should be removed.\u003c/p\u003e\n\u003cp\u003eWhen used within \u003ca class=\"xref\" href=\"/docs/18/runtime-config-wal.html#GUC-ARCHIVE-CLEANUP-COMMAND\"\u003earchive_cleanup_command\u003c/a\u003e, all WAL files logically preceding the value of the \u003ccode class=\"literal\"\u003e%r\u003c/code\u003e argument will be removed from \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. This minimizes the number of files that need to be retained, while preserving crash-restart capability. Use of this parameter is appropriate if the \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a transient staging area for this particular standby server, but \u003cspan class=\"emphasis\"\u003e\u003cem\u003enot\u003c/em\u003e\u003c/span\u003e when the \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is intended as a long-term WAL archive area, or when multiple standby servers are recovering from the same archive location.\u003c/p\u003e\n\u003cp\u003eWhen used as a standalone program all WAL files logically preceding the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e will be removed from \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e. In this mode, if you specify a \u003ccode class=\"filename\"\u003e.partial\u003c/code\u003e or \u003ccode class=\"filename\"\u003e.backup\u003c/code\u003e file name, then only the file prefix will be used as the \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoldestkeptwalfile\u003c/code\u003e\u003c/em\u003e. This treatment of \u003ccode class=\"filename\"\u003e.backup\u003c/code\u003e file name allows you to remove all WAL files archived prior to a specific base backup without error. For example, the following example will remove all files older than WAL file name \u003ccode class=\"filename\"\u003e000000010000003700000010\u003c/code\u003e:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003epg_archivecleanup -d archive 000000010000003700000010.00000020.backup\n\npg_archivecleanup:  keep WAL file \"archive/000000010000003700000010\" and later\npg_archivecleanup:  removing file \"archive/00000001000000370000000F\"\npg_archivecleanup:  removing file \"archive/00000001000000370000000E\"\n\u003c/pre\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e assumes that \u003cem class=\"replaceable\"\u003e\u003ccode\u003earchivelocation\u003c/code\u003e\u003c/em\u003e is a directory readable and writable by the server-owning user.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.6\"\u003e\n\u003ch2\u003eOptions\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e accepts the following command-line arguments:\u003c/p\u003e\n\u003cdiv class=\"variablelist\"\u003e\n\u003cdl class=\"variablelist\"\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-b\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--clean-backup-history\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eRemove backup history files as well. See \u003ca class=\"xref\" href=\"/docs/18/continuous-archiving.html#BACKUP-BASE-BACKUP\" title=\"25.3.2. Making a Base Backup\"\u003eSection 25.3.2\u003c/a\u003e for details about backup history files.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-d\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--debug\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint lots of debug logging output on \u003ccode class=\"filename\"\u003estderr\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-n\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--dry-run\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the names of the files that would have been removed on \u003ccode class=\"filename\"\u003estdout\u003c/code\u003e (performs a dry run).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-V\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--version\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003ePrint the \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e version and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-x \u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--strip-extension=\u003cem class=\"replaceable\"\u003e\u003ccode\u003eextension\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eProvide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: \u003ccode class=\"literal\"\u003e-x .gz\u003c/code\u003e.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e-?\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"option\"\u003e--help\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\n\u003cdd\u003e\n\u003cp\u003eShow help about \u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e command line arguments, and exit.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.7\"\u003e\n\u003ch2\u003eEnvironment\u003c/h2\u003e\n\u003cp\u003eThe environment variable \u003ccode class=\"envar\"\u003ePG_COLOR\u003c/code\u003e specifies whether to use color in diagnostic messages. Possible values are \u003ccode class=\"literal\"\u003ealways\u003c/code\u003e, \u003ccode class=\"literal\"\u003eauto\u003c/code\u003e and \u003ccode class=\"literal\"\u003enever\u003c/code\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.8\"\u003e\n\u003ch2\u003eNotes\u003c/h2\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is designed to work with \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 8.0 and later when used as a standalone utility, or with \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 9.0 and later when used as an archive cleanup command.\u003c/p\u003e\n\u003cp\u003e\u003cspan class=\"application\"\u003epg_archivecleanup\u003c/span\u003e is written in C and has an easy-to-modify source code, with specifically designated sections to modify for your own needs\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"refsect1\" id=\"id-1.9.5.4.9\"\u003e\n\u003ch2\u003eExamples\u003c/h2\u003e\n\u003cp\u003eOn Linux or Unix systems, you might use:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003earchive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2\u0026gt;\u0026gt;cleanup.log'\n\u003c/pre\u003e\n\u003cp\u003ewhere the archive directory is physically located on the standby server, so that the \u003ccode class=\"varname\"\u003earchive_command\u003c/code\u003e is accessing it across NFS, but the files are local to the standby. This will:\u003c/p\u003e\n\u003cdiv class=\"itemizedlist\"\u003e\n\u003cul class=\"itemizedlist\"\u003e\n\u003cli class=\"listitem\"\u003e\n\u003cp\u003eproduce debugging output in \u003ccode class=\"filename\"\u003ecleanup.log\u003c/code\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli class=\"listitem\"\u003e\n\u003cp\u003eremove no-longer-needed files from the archive directory\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003c/div\u003e","related":[],"sections":[],"tables":[{"columns":[{"key":"signature","label":"Option and arguments"},{"key":"summary","label":"Description"}],"key":"options","rows":[{"signature":{"text":"-b --clean-backup-history","url":"/docs/18/pgarchivecleanup.html"},"summary":"Remove backup history files as well. See Section 25.3.2 for details about backup history files."},{"signature":{"text":"-d --debug","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print lots of debug logging output on stderr ."},{"signature":{"text":"-n --dry-run","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print the names of the files that would have been removed on stdout (performs a dry run)."},{"signature":{"text":"-V --version","url":"/docs/18/pgarchivecleanup.html"},"summary":"Print the pg_archivecleanup version and exit."},{"signature":{"text":"-x extension --strip-extension= extension","url":"/docs/18/pgarchivecleanup.html"},"summary":"Provide an extension that will be stripped from all file names before deciding if they should be deleted. This is typically useful for cleaning up archives that have been compressed during storage, and therefore have had an extension added by the compression program. For example: -x .gz ."},{"signature":{"text":"-? --help","url":"/docs/18/pgarchivecleanup.html"},"summary":"Show help about pg_archivecleanup command line arguments, and exit."}],"title":"Documented options"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
