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 upstream as DEB packages for Debian 10, 11 and Ubuntu 18.04, 20.04, 22.04.
For CentOS 8, RPM packages for ETCD is available within Percona Distribution for PostreSQL. You can install it using the following command:
$ sudo yum install etcd python3-python-etcd
See the configuration guidelines for Debian and Ubuntu and RHEL and CentOS.
See also
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
Created: November 23, 2022