Skip to content

Instantly share code, notes, and snippets.

@mstred
Created December 23, 2016 21:20
Show Gist options
  • Save mstred/41f137007e00068a97585e2264ba30b7 to your computer and use it in GitHub Desktop.
Save mstred/41f137007e00068a97585e2264ba30b7 to your computer and use it in GitHub Desktop.
Cleaning up pg_xlogs in a postgres' docker container
docker exec -it <postgres container> su -c "rm /var/lib/postgresql/data/postmaster.pid && /usr/lib/postgresql/<version>/bin/pg_resetxlog -f /var/lib/postgresql/data" postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment