Skip to content

Instantly share code, notes, and snippets.

@pahaz
Created September 5, 2018 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pahaz/c722461c619bcc98d6ba123615c9e50b to your computer and use it in GitHub Desktop.
Save pahaz/c722461c619bcc98d6ba123615c9e50b to your computer and use it in GitHub Desktop.
#!/bin/bash
for v in `docker ps --format '{{.Names}}\t{{.Status}}' | grep postgres | awk '{ print $1 }'`
do
echo $v
NNN=$v
docker exec -it $NNN vacuumdb --all -U postgres --full --analyze
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment