Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

**High Priority** repmgr with multi slaves replication solution is not working in k8s environment #836

Open
Bhagi33 opened this issue Dec 14, 2023 · 0 comments

Comments

@Bhagi33
Copy link

Bhagi33 commented Dec 14, 2023

Hi Team,

On kubernetes i am deploying postgres with
1 master(postgres-master-0),
1 witness(witness-slave-0-0)
2 slaves: slave1(witness-slave-1-0) & slave2(witness-slave-2-0)

But repmgr replication solution is not working. when i register 2 standby's , they are trying to run as primary .
i am attaching the screenshots and its configuration parameters. please guide me to fix the issue.

-> Below configuration is of Master and standby's

cat /persistent/postgres/postgresql/pg_hba.conf

local replication repmgr trust
host replication repmgr 127.0.0.1/32 trust
host replication repmgr 16.0.0.0/16 trust

local repmgr repmgr trust
host repmgr repmgr 127.0.0.1/32 trust
host repmgr repmgr 16.0.0.0/16 trust
local postgres embahar trust
host replication repmgr 0.0.0.0/0 trust
host repmgr repmgr 0.0.0.0/0 trust
host postgres grafmon 0.0.0.0/0 md5

witness-slave-1-0:/home/postgres$ cat /persistent/postgres/postgresql/postgresql.conf
listen_addresses = '*'
shared_preload_libraries = 'repmgr,pg_cron'
max_wal_senders = 10
max_replication_slots = 10
wal_level = 'replica'
hot_standby = on
archive_mode = on
archive_command = '/bin/true'

--> Witenss configuration

cat /persistent/postgres/postgresql/pg_hba.conf
local replication repmgr trust
host replication repmgr 127.0.0.1/32 trust
host replication repmgr 16.0.0.0/16 trust

local repmgr repmgr trust
host repmgr repmgr 127.0.0.1/32 trust
host repmgr repmgr 16.0.0.0/16 trust
local postgres embahar trust
host replication repmgr 0.0.0.0/0 trust
host repmgr repmgr 0.0.0.0/0 trust
host postgres grafmon 0.0.0.0/0 md5

cluster events
pg-hba-conf
postgres-conf
repmgr cluster show
witness-slave-0-0:/home/postgres$ cat /persistent/postgres/postgresql/postgresql.conf
listen_addresses = '*'
shared_preload_libraries = 'repmgr,pg_cron'
witness-slave-0-0:/home/postgres$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant