Top
Enterprise Postgres 17 SP1 Operation Guide

Appendix N Utilize zEnterprise Data Compression (zEDC)

In conjunction with a feature called zEDC, IBM Z enables faster compression and decompression. The functions of zEDC are available by using zlib library and gzip command corresponding to zEDC. This product can use zEDC because it also uses zlib and gzip.

Refer to IBM documentation for zEDC compression characteristics, required hardware, software requirements, and more.

The compression and decompression processes available with zEDC are as follows:

Feature

How to specify compression/decompression operations that enable zEDC

Target

pg_basebackup

The output format is tar and gzip compression is enabled with the -z, --gzip, -Z, and --compress option.

A base backup

pg_dump

Compression of custom-format archive or directory-format archive.

Custom-format archive or directory-format archive

pg_restore

Decompression of custom-format achive or directory-format archive.

Custom-format archive or directory-format archive

pg_receivewal

Compressed by -Z and -compress options.

Received WAL

pgcrypto

The following functions compress with option compress-algo of 1 or 2:

  • pgp_sym_encrypt(data text, psw text [, options text ]) returns bytea

  • pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) returns bytea

  • pgp_pub_encrypt(data text, key bytea [, options text ]) returns bytea

  • pgp_pub_encrypt_bytea(data bytea, key bytea [, options text ]) returns bytea

Further, the encrypted compressed data by the above functions is decrypted as follows:

  • pgp_sym_decrypt(msg bytea, psw text [, options text ]) returns text

  • pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns bytea

  • pgp_pub_decrypt(msg bytea, key bytea [, psw text [, options text ]]) returns text

  • pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) returns bytea

In the encrypt functions, the data argument

In the decrypt functions, the msg argument

pgx_dmpall

Compressed by -Z and -compress options in pgx_dmpall command.

Compressed by -Z in archive_command.

Backup data

Archive logs

pgx_rcvall

Decompression process when restoring compressed backup data.

Backup data

Archive logs

pg_rman

When the backup data is compressed with -z or --compress-data option.

When restoring compressed backup data.

Backup data

Streaming replication

Compressed by streaming_wal_compression in postgresql.conf of standby server.

WAL data

Note

By default, zEDC is enabled only at compression level 1 of zlib and gzip.If necessary, change the compression level at which zEDC is enabled with the DFLTCC_LEVEL_MASK environment variable.

Refer to IBM documentation for more information on zEDC because IBM may change the specification of zEDC.

For pgcrypto functions, change the compression level with compress-level and specify whether to use zEDC.

For streaming replication feature, change the compression level with streaming_wal_compression and specify whether to use zEDC. Because compression is performed on the primary server, if you want to change the behavior of the zEDC, change the environment variable when you start the primary server. Similarly, decompression is performed on the standby server, so if you want to change the behavior of zEDC, change the environment variable when the standby server starts.

For pg_rman compression, the default compression level is used. (In general, the default compression level is 6.)