Skip to content

Enable Percona Distribution for PostgreSQL extensions

Some extensions require additional configuration before using them with Percona Distribution for PostgreSQL. This sections provides configuration instructions per extension.

Patroni

Patroni is the third-party high availability solution for PostgreSQL. The High Availability in PostgreSQL with Patroni chapter provides details about the solution overview and architecture deployment.

While setting up a high availability PostgreSQL cluster with Patroni, you will need the following components:

  • Patroni installed on every postresql node.

  • Distributed Configuration Store (DCS). Patroni supports such DCSs as ETCD, zookeeper, Kubernetes though ETCD is the most popular one. It is available within Percona Distribution for PostgreSQL for all supported operating systems.

  • HAProxy.

See the configuration guidelines for Debian and Ubuntu and RHEL and CentOS.

pgBadger

Enable the following options in postgresql.conf configuration file before starting the service:

log_min_duration_statement = 0
log_line_prefix = '%t [%p]: '
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
log_autovacuum_min_duration = 0
log_error_verbosity = default

For details about each option, see pdBadger documentation.

pgAudit set-user

Add the set-user to shared_preload_libraries in postgresql.conf. The recommended way is to use the ALTER SYSTEM command. Connect to psql and use the following command:

ALTER SYSTEM SET shared_preload_libraries = 'set-user';

Start / restart the server to apply the configuration.

You can fine-tune user behavior with the custom parameters supplied with the extension.

wal2json

After the installation, enable the following option in postgresql.conf configuration file before starting the service:

wal_level = logical

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.