[pgpool-general: 8487] Re: disable load balancing to a master/slave cluster with streaming replication
Bo Peng
pengbo at sraoss.co.jp
Tue Nov 8 14:58:28 JST 2022
Hello,
> Il giorno lun, 07/11/2022 alle 13.40 +0100, Giuseppe Sacco ha scritto:
> > Hello,
> > I setup a master/slave configuration with postgresql 14, and I would like to
> > send all read queries to the slave and all write statements to master. I
> > enabled load balancing and specified backend_weight equal 0 for the master
> > and 1 for the slave. Now, when clients connect and issue a write statement,
> > they get errors about the postgresql being in read only. So, I think, these
> > statements were sent to the slave machine.
> [...]
Are all write queries sent to the primary?
Or just specific queries?
> How may I collect information about the way pgpool select the backend? Is
> there any specific string I should look for in the log when running with
> option -d? Does debug output include valuable information?
If you enable "log_per_node_statement = on" to output the queries, it may help.
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
https://www.sraoss.co.jp/
More information about the pgpool-general
mailing list