[pgpool-general: 975] Re: BEGIN/END statements on hot standby node

Tatsuo Ishii ishii at postgresql.org
Sat Sep 8 16:15:25 JST 2012


> Hey guys, I've got a pair of postgres (9.1) servers setup behind pgpool in hot standby/streaming replication mode.  I decided to run pgbench against it to see which commands get sent where (basically I figured all of them should go to the master).  For the most part I saw all queries going to the master like I thought (because they all happen in transactions), but everytime a transaction was started on the master I saw the following on the slave (from the statement logs):
> 
> Sep  5 22:06:21 pgm2 postgres[21529]: [198-1] 2012-09-05 22:06:21 UTC LOG:  statement: BEGIN;
> Sep  5 22:06:21 pgm2 postgres[21529]: [199-1] 2012-09-05 22:06:21 UTC LOG:  duration: 0.242 ms
> Sep  5 22:06:21 pgm2 postgres[21529]: [200-1] 2012-09-05 22:06:21 UTC LOG:  statement: END;
> Sep  5 22:06:21 pgm2 postgres[21529]: [201-1] 2012-09-05 22:06:21 UTC LOG:  duration: 0.231 ms
> 
> So it looks like it's starting a transaction on both the master & stand-by everytime.  Is this the expected behavior?

Yes.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-general mailing list