Skip to content

Instantly share code, notes, and snippets.

@nim4n136
Last active January 5, 2021 02:43
Show Gist options
  • Save nim4n136/2ce5100a94252277934cc93aced1d70f to your computer and use it in GitHub Desktop.
Save nim4n136/2ce5100a94252277934cc93aced1d70f to your computer and use it in GitHub Desktop.
Clean pg_wal
# Check checkpoint pg wal
pg_controldata -D /var/lib/postgresql/data/
##
# Find this line
# Latest checkpoint's REDO WAL file: 000000010000000000000001
# Check pg wal / Dryrun
pg_archivecleanup -n /var/lib/postgresql/data/ 000000010000000000000001
# Remove pg wal
pg_archivecleanup -d /var/lib/postgresql/data/ 000000010000000000000001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment