Postgres 9.6 active-passive HA cluster - Mailing list pgsql-general

From Jairam Gauns
Subject Postgres 9.6 active-passive HA cluster
Date
Msg-id CABi+Qf8+oHW1tv7ykqv3R4rjm-K+taf3Wz9kcogaFz9OECqL9w@mail.gmail.com
Whole thread Raw
Responses Re: Postgres 9.6 active-passive HA cluster
List pgsql-general
Hi guys,

 

We are in process of testing a Postgres 9.6 active-passive HA cluster using

streaming replication on Rhel 7.6.

We have setup Postgres 9.6 primary/warm standby streaming synchorous replication.

We have set synchronous_standby_names=* and synchronous_commit=on.

 

To test we have 5 sql clients firing inserts simultaneously on the 12 tables created on a db present on the primary. each client would end up firing 2000 request.

So when i run this experiment, i kill postgres on primary say after 8000 records are inserted.

Then i start both nodes as standalone to compare the data.

 

So once in a while i observe that  there exist one record more in a few tables on the killed  primary than as compared to the records on the standby.

Our expectation is both servers should have same number of records when we set synchronous replication. Because if that does not happen and now i make the failed primary the new standby then the records would not be saved as the new primary(old standby) did not have them in the first place.
How do we handle this situation?

 

Could anybody please help provide some pointers?

Thanks
Jairam

pgsql-general by date:

Previous
From: M Tarkeshwar Rao
Date:
Subject: Is there any configuration in postgresql.conf or any otherconfiguration of postgres which will make this possible to listen onparticular interface
Next
From: Francisco Olarte
Date:
Subject: Re: Is there any configuration in postgresql.conf or any otherconfiguration of postgres which will make this possible to listen onparticular interface