There is another tool called pg_squeeze but not tested for the moment


Refer to

Build from sources

OpenSSL 1.1.x and Libmemcached are required only to build the package/extension from pg_repack not for execution usage.
# OpenSSL
wget -O - |tar xvzf  -  && cd openssl-OpenSSL_1_1_1d/
./config --prefix=/opt/pg_repack --openssldir=/opt/pg_repack  shared zlib
make -j$(nproc) && sudo make install

# Libmemcached
cd ..
wget --no-check-certificate ""
tar xvzf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18/
./configure --prefix=/opt/pg_repack
make -j$(nproc) && sudo make install

# Pg_repack
cd ..
wget -O - | tar xvzf - && cd pg_repack-ver_1.4.5/
make LDFLAGS='-L/opt/pg_repack/lib/'
sudo chmod 777 -R /opt/PostgresPlus/9.6AS/as9.6/
make install