Brendan Buckingham

A blog to share the things I learn to hopefully help others on their programming journeys

Installing pg_repack on EC2 instance with Ubuntu

At my job, we use pg_repack on our Postgresql database to clean it up periodically. When I started, I hadn’t used it before, and found very little information on the web about it, and how to install it. First, I tried installing in locally, which wasn’t too difficult, and I may create a post for that sometime as well. But I decided that it would be better to run it from an EC2 instance instead of my local machine, to avoid possible issues with losing connectivity while running the process. This was less straight forward, and required significant digging to get to work. Below are the steps I took:

  • Download the version of pg_repack you want to install using wget

wget ''

  • Unzip the package and change to the newly created director:

sudo unzip
cd pg_repack-1.4.3

  • Next, you will need to install...

Continue reading →