[pgpool-general: 7043] Re: PREPARE STATMENTS
pengbo at sraoss.co.jp
Wed May 27 15:45:43 JST 2020
On Tue, 26 May 2020 09:47:17 -0300
Matthew MacDonald <mmacdonald at intertalksystems.com> wrote:
> Hi Bo,
> Can you explain the rationale for sending prepared statements to only the
> primary node? If a prepared statement contains an UPDATE or INSERT - will
> this result in the back-end databases being out-of-sync if native
> replication is being used, since the query is only sent to the primary node?
In master-slave mode, pgpool sends prepare statements to Primary only.
In native replication mode, pgpool sends prepare statements to both Primary and Standby.
> MATTHEW MACDONALD
> On Tue, May 26, 2020 at 4:44 AM Bo Peng <pengbo at sraoss.co.jp> wrote:
> > hello,
> > On Fri, 22 May 2020 17:58:00 +0200
> > Franco Ricci <franco.ricc at gmail.com> wrote:
> > > I’s possible specify which server should execute a "prepared statement"?
> > > I noticed in pgpool 4.1 that ordinary query are routed on master or
> > slave server according query action (SELECT, UPDATE etc.).
> > > If I create a PREPARE STATEMENT this query is routed always on master
> > server and never executed on slave even if statements is only a SELECT
> > query!
> > >
> > > There is a way to programmatic set which is the server that has to
> > server a prepared statement?
> > No.
> > Pgpool doesn't load balance "prepared statement".
> > "Prepared statement" should be sent to primary only.
> > > _______________________________________________
> > > pgpool-general mailing list
> > > pgpool-general at pgpool.net
> > > http://www.pgpool.net/mailman/listinfo/pgpool-general
> > --
> > Bo Peng <pengbo at sraoss.co.jp>
> > SRA OSS, Inc. Japan
> > _______________________________________________
> > pgpool-general mailing list
> > pgpool-general at pgpool.net
> > http://www.pgpool.net/mailman/listinfo/pgpool-general
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
More information about the pgpool-general