hapostgres / pg_auto_failover

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

Fix a race condition in node registration. #847

Closed DimCitus closed 2 years ago

DimCitus commented 2 years ago

Without this fix, we could register first a node that is not meant to be a primary. The node then is assigned REPORT_LSN, but there is no primary in the group yet, and now, all the other nodes fail to register because there is already a node registered, but there is no primary...