Postgresql – Connection pooling with 3 databases but 1 database as master for repmgr replication

pgbouncerpostgresqlpostgresql-9.3repmgr

I'm using pgbouncer for connection pooling against 3 database on different servers, now I'm planning to use repmgr for replication, my question is, can I keep doing connection pooling on these 3 databases and have one of them as master replicating to the others, or I should have pgbouncer doing connection pooling on one database and have this as master replicating to the others?

My intention is have connections being distributed over databases and make use all database are up to date and returning updated data to users.

Best Answer

After research more about this topic the answer is, no, I can't, the repmgr way to work allows me to have pgbouncer connecting to master instance of postgres to handle writes and allowing to use slaves to perform reads.

I order to archive the goal exactly like I asked I must use pgbouncer for connection pooling and use pgpool2 and its Statement-Based Middleware for replication.