Last active
May 22, 2023 05:55
-
-
Save johanndt/d32f5ccd248b415c203c1fcc131f23cc to your computer and use it in GitHub Desktop.
run pg_repack on existing running postgresql 9.6
This file contains 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
apt-get update | |
apt-get install postgresql-server-dev-11 unzip | |
cd /tmp | |
wget http://api.pgxn.org/dist/pg_repack/1.4.4/pg_repack-1.4.4.zip | |
unzip pg_repack-1.4.4.zip | |
cd pg_repack-1.4.4 | |
make | |
make install | |
su - postgres | |
psql -c "CREATE EXTENSION pg_repack" -d db_name | |
/usr/lib/postgresql/11/bin/pg_repack db_name | |
psql -c "DROP EXTENSION pg_repack" -d db_name | |
exit | |
rm -rf /tmp/pg_repack* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment