[pgpool-general: 2751] Re: pgpool passing BEGIN statements to secondaries?
Yugo Nagata
nagata at sraoss.co.jp
Fri Apr 11 10:49:42 JST 2014
Hi,
This is the expected behavior.
To handle cursors of JDBC driver on standby node in master/slave mode,
the transaction commands are sent to all nodes.
This is since the folowing commit:
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=876aa5433aceff40ad0f136cbd95d8c48f17e546
On Wed, 9 Apr 2014 20:28:21 -0400
Christophe Pettus <xof at thebuild.com> wrote:
> Greetings,
>
> We just saw very odd behavior on a client's machine; in particular, pgpool (Ubuntu 12.04, 3.3.2-1.pgdg12.4+1) was passing BEGIN statements and subsequent transactions to the secondary. We're not sure how that could happen. The client was connecting via pgbouncer in front of pgpool, using JDBC (driver 9.3-1101-jdbc41). Example log lines from the secondary attached below. Thoughts on what might cause this?
>
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.266 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,3,"PARSE",2014-04-09 22:23:20 UTC,29/17505,0,LOG,00000,"duration: 0.183 ms parse <unnamed>: BEGIN",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.267 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,4,"BIND",2014-04-09 22:23:20 UTC,29/17505,0,LOG,00000,"duration: 0.031 ms bind <unnamed>: BEGIN",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.269 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,5,"BEGIN",2014-04-09 22:23:20 UTC,29/17505,0,LOG,00000,"duration: 0.032 ms execute <unnamed>: BEGIN",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.355 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,6,"PARSE",2014-04-09 22:23:20 UTC,29/17505,0,LOG,00000,"duration: 0.047 ms parse <unnamed>: ROLLBACK",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.358 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,7,"BIND",2014-04-09 22:23:20 UTC,29/17505,0,LOG,00000,"duration: 0.020 ms bind <unnamed>: ROLLBACK",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.360 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,8,"ROLLBACK",2014-04-09 22:23:20 UTC,29/0,0,LOG,00000,"duration: 0.020 ms execute <unnamed>: ROLLBACK",,,,,,,,,"db02"
> postgresql-20140409-222311.csv:2014-04-09 22:23:20.363 UTC,"db_user","xxx",19545,"172.31.0.232:33043",5345c858.4c59,9,"DISCARD ALL",2014-04-09 22:23:20 UTC,29/0,0,LOG,00000,"duration: 0.129 ms statement: DISCARD ALL",,,,,,,,,"db02"
>
> --
> -- Christophe Pettus
> xof at thebuild.com
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
--
Yugo Nagata <nagata at sraoss.co.jp>
More information about the pgpool-general
mailing list