On
09 September 2020 11:12 Dirk Krautschick <Dirk.Krautschick@xxxxxxxxxxxx> wrote:
my goal is to create a replication cluster with several nodes and all guaranteed in sync to provide
Potential in this case means that it is in the list of standbys that are available to respond to a synchronous commit request but that it is not the highest priority member of the list
This is expected; the synchronous_commit parameter tells Postgres
when it can acknowledge commit of a transaction, not how many standbys it must wait for.
The behaviour you describe here is exactly as expected, assuming you have 2 standbys. The "2" in your synchronous_standby_nodes setting is "num_sync", ie the number of synchronous standbys that transactions need to wait for replies from.
If you do not include this, the Postgres interprets your request as "I want to be sure that my transaction has committed on at least one of the standbys in the following list"
The FIRST or ANY just tells Postgres in which order it should consider the standbys that you list. Best Regards,
Karen JEX
|