Seeking clearer guidance on Implementing HA Patroni for PostgreSQL 15 on RHEL 9 in a production environment

We are following the document on Deploying PostgreSQL for high availability with Patroni on RHEL or CentOS for our Lab setup. However, the document appears to be somewhat confusing.

We have a question regarding the command used for setting up PostgreSQL 15. Is the following command valid for PostgreSQL 15?

sudo percona-release setup ppg14

We are curious why ppg14 is being used instead of ppg-15.3.

Could you please confirm whether the document located at Deploying on RHEL or CentOS - Percona Distribution for PostgreSQL is the sole document we should be following, or if there are other documents we should refer to as well?

Concerning PostgreSQL 15 for high availability, do we need to execute the provided commands on each node? The commands include:

sudo yum install percona-pg_repack15
sudo yum install percona-pgaudit
sudo yum install percona-pgbackrest
sudo yum install percona-pgbouncer
so on

This information is based on the instructions outlined in the document at Install on RHEL and derivatives - Percona Distribution for PostgreSQL
Also seeking help for SSL implimentation

Thank you for your assistance.

About installing percona pg15 on RedHat, as demonstrated using CENTOS8

REFERENCE
Seeking clearer guidance on Implementing HA Patroni for PostgreSQL 15 on RHEL 9 in a production environment


INSTALLATION COMMANDS

dnf update
dnf module disable -y postgresql llvm-toolset
dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

percona-release setup -y ppg-15

dnf install -y percona-pg_repack15 percona-pgaudit percona-pgbackrest percona-pgbouncer

initialize data cluster in default location

/usr/pgsql-15/bin/postgresql-15-setup initdb

systemctl start postgresql-15


CONFIRM SERVER IS ACTIVE

ss -4tlnp
State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0 244 127.0.0.1:5432 0.0.0.0:* users:((“postmaster”,pid=12999,fd=7))


Packages percona-pg_repack15 percona-pgaudit should be installed on all postgres servers

Packages percona-pgbackrest and percona-pgbouncer are installed either on all postgres servers or on their own dedicated hosts. This really depends on the architecture that you choose. For example, setting up pg_backrest on a dedicated host means you can choose to “pull” the WALs. A WAL “push” on the otherhand means installing pgbackrest on each postgres server as you will end up using the CLI “pgbackrest” as an argument for postgres runtime parameter “archive_command”. As for pgbouncer, a lot of people like installing one instance on each server but you can just as easily sit the connection pooler on a dedicated host.


In regards to SSL you can create a self-signed certificate and update the pertinent runtime parameters accordingly. Refer here for more information.

thanks for reply
we are planning on High Availability for PostgreSQL 15 on RHEL 9 in a production with Patroni
is the above step is correct
as my understand petroni takes care initdb.

is below steps required for Patroni
/usr/pgsql-15/bin/postgresql-15-setup initdb

systemctl start postgresql-15

as document is not tell about other component like pgbouncer etc …so we are not clear much.
can u guide us pleade.

Hi,
Sorry about the delay responding.

as documentation does not tell about other component like pgbouncer etc …so we are not clear much. Can u guide us please

It is true that pgbouncer is normally independent of patroni management. Take a look at Patroni callbacks which can execute supplementary scripted actions. Another approach is implementing HA Proxy which can decided how to redirect connections meant for the Leader.

Hope this helps.