sorintlab / stolon

PostgreSQL cloud native High Availability and more.
https://talk.stolon.io
Apache License 2.0
4.66k stars 447 forks source link

Mistype in docker-compose-pg.yml #785

Open creepymorties opened 4 years ago

creepymorties commented 4 years ago

What happened:

This bug is related to an issue with documentation, in particular the .yml file provided in docker swarm example (https://github.com/sorintlab/stolon/blob/master/examples/swarm/docker-compose-pg.yml)

There is a slight mistype in the file, but it leads to a bigger issue.

For second user (replication) on keeper1 password is taken from secrets/pgsql_repl file, on keeper2 it is retrieved from secrets/pgsql. This way it might lead to a situation where for the same user on different keepers different passwords will be used. If the password is the same in both files (i.e. same for super user and replication) it causes no trouble, but if it is different it will result in keepers not being able to resync after one's failure.

Log message of failure is going to look like this:

pg_basebackup: could not connect to server: FATAL: password authentication failed for user 'replication'

Here is the screenshot with the mistype highlighted:

mistype

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment: