Last active
January 5, 2021 02:43
-
-
Save nim4n136/2ce5100a94252277934cc93aced1d70f to your computer and use it in GitHub Desktop.
Clean pg_wal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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