In PostgreSQL is synchronous replication via the setting of synchronous_commit = on (https://postgrespro.ru/docs/postgrespro/12/runtime...
on the master.
Raised 1 master node and 2 slave. Set up replication postgres correctly says that both slave can work via synchronous replication.
To check wrote a script which does the insert into master and then extracts the data from the two slaves.
For the test insert 1000 records in a row. When you search for them in the slave sometimes not. For example finds 998 out of 1000 is inserted. If you add a small delay, you can find all of the records consistently.
When synchronous_commit = on, the master must wait for confirmation that the data saved to disk from each synchronous slave and only then to respond to the client on successful implementation.
Can anyone faced similar problem?
The task is to put the master node to write, but all read requests must handle synchronous replicas, but the problem is not found by the records casts doubt on a bundle.
For the dough raised in containers and ask questions on github. Perhaps a more detailed description of the problem will be there https://github.com/bitnami/bitnami-docker-postgres...