https://github.com/pramsey/pgsql_gzip/
Sometimes you just need to compress your bytea object before you return it to the client.
Sometimes you receive a compressed bytea from the client, and you have to uncompress it before you can work with it.
This extension is for that.
This extension is not for storage compression. PostgreSQL already does tuple compression on the fly if your tuple gets large enough, manually pre-compressing your data using this function won't make things smaller.
The PostgreSQL RPM repository uses PostgreSQL version numbers in the RPM packages. For example pgsql_gzip for PostgreSQL 17 is named as pgsql_gzip_17. Similarly pgsql_gzip for PostgreSQL 15 is named as pgsql_gzip_15.
pgsql_gzip provides the following subpackages:
Install PGDG repository from: https://yum.postgresql.org/repopackages/
OS | Command |
---|---|
RHEL / Rocky Linux / AlmaLinux / Fedora | dnf install pgsql_gzip_17 (or change the version as described above) |
Connect to the database that you want to create the extension as superuser and run:
CREATE EXTENSION gzip;
PostgreSQL version(s) | OS version | Arch | Status |
---|---|---|---|
17,16,15,14,13 | RHEL / Rocky Linux / AlmaLinux 9 | x86_64, aarch64 | Available |
17,16,15,14,13 | RHEL / Rocky Linux / AlmaLinux 8 | x86_64, aarch64 | Available |
17,16,15,14,13 | Fedora Linux | x86_64 | Available |