hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.07k stars 112 forks source link

Primary lost connection to secondary and no replication but monitor from third site still have connection to both allowing read access to secondary. #1000

Closed allanharry closed 9 months ago

allanharry commented 1 year ago

Hi

db-pgxxxxx and db-pgyyyyy in site 1 and 2 Monitor in site 3 is able to connect to both db-pgxxxxx and db-pgyyyyy db-pgxxxxx cannot connect to db-pgyyyyy and vica versa

My concern is that secondary still available for read all though replication has stopped.

pg_autoctl show state --formation aap_pre_1 Name | Node | Host:Port | TLI: LSN | Connection | Reported State | Assigned State --------------+-------+--------------------+------------------+--------------+---------------------+-------------------- db-pgxxxxx | 1 | 10.96.127.111:5432 | 16: 62/57003458 | read-only | secondary | secondary db-pgyyyyy | 2 | 10.96.103.35:5432 | 16: 62/70000000 | read-write | primary | primary

Should this be allowed from a cluster perspective as secondary is long behind the primary ?

PG13 running pg_auto_failover 1.6.4 on RHEL 8

Regards Allan

xinferum commented 1 year ago

Hello.

I will also add our similar ticket for information https://github.com/hapostgres/pg_auto_failover/issues/997

dimitri commented 9 months ago

Closing, duplicate of #997.