Skip to content

Commit 9e52e62

Browse files
pg_archivecleanup: add page (#18486)
Co-authored-by: Managor <[email protected]>
1 parent f556472 commit 9e52e62

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pages/common/pg_archivecleanup.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# pg_archivecleanup
2+
3+
> Remove old WAL archive files in PostgreSQL.
4+
> More information: <https://www.postgresql.org/docs/current/pgarchivecleanup.html>.
5+
6+
- Clean an archive directory up to a given WAL file:
7+
8+
`pg_archivecleanup {{path/to/archive}} {{path/to/walfile}}`
9+
10+
- Perform a dry run (list files that would be removed without actually doing it):
11+
12+
`pg_archivecleanup {{[-n|--dry-run]}} {{path/to/archive}} {{path/to/walfile}}`
13+
14+
- Strip a file extension before deciding deletion:
15+
16+
`pg_archivecleanup {{[-x|--strip-extension]}} {{extension}} {{path/to/archive}} {{path/to/walfile}}`
17+
18+
- Remove backup history files too:
19+
20+
`pg_archivecleanup {{[-b|--clean-backup-history]}} {{path/to/archive}} {{path/to/walfile}}`
21+
22+
- Enable debug logging output:
23+
24+
`pg_archivecleanup {{[-d|--debug]}} {{path/to/archive}} {{path/to/walfile}}`

0 commit comments

Comments
 (0)