Query In-Sync Slave

66 Views Asked by At

My PostgreSQL setup uses 3-node High Availability via async replication: primary and 2 slaves. Either slave has to acknowledge the write before the primary can COMMIT.

I need to run a SQL SELECT, ideally against the in-sync slave. I could build a new connection pool against one of the slaves, but it’s dynamic as to which is in-sync.

Is there any way for me to easily run a SELECT against the in-sync slave?

0

There are 0 best solutions below