I am using this command sudo apt-get install postgresql-11-repack
to install pg_repack(default to 1.4.8).
postgresql-11-repack is already the newest version (1.4.8-1.pgdg20.04+1).
when i run "create extension pg_repack" in rds postgres 11, it creates by default with version 1.4.4.
List of installed extensions
Name | Version | Schema | Description
--------------+---------+------------+--------------------------------------------------------------
pg_repack | 1.4.4 | public | Reorganize tables in PostgreSQL databases with minimal locks
so pg_repack fails due to mismatch in version number between ec2 and db.
ERROR: pg_repack failed with error: program 'pg_repack 1.4.8' does not match database library 'pg_repack 1.4.4'
- how do i create repack extension with version 1.4.8 in DB?
- if above is not possible, how do i downgrade by pg_repack version on ec2 back to 1.4.4 same as my db.
- AWS does not allow me to add this extension under "shared_preload_libraries" either.
Error compiling from source:
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-10/lib -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed -L/usr/lib/x86_64-linux-gnu -lpq -L/usr/lib/postgresql/11/lib -lpgcommon -lpgport -lpthread -lssl -lcrypto -lz -lrt -lcrypt -ldl -lm -o pg_repack
/usr/bin/ld: cannot find -lpgcommon
/usr/bin/ld: cannot find -lpgport
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk:430: pg_repack] Error 1
make[1]: Leaving directory '/home/user/pg_repack-ver_1.4.4/bin'
make: *** [Makefile:35: all] Error 2
enter code here
1.4.4
binary somewhere or compile it from pg_repack version 1.4.4 source code