[pgpool-general: 4322] Re: How to test pgpool?

Tatsuo Ishii ishii at postgresql.org
Wed Jan 13 16:45:19 JST 2016

>> Pgpool has a built in SQL parser inside. By using it, pgpool can know
>> whether it gets update the database. If so, pgpool will route the
>> query to the master (primary) PostgreSQL. If the query does not update
>> the database, pgpool sends it to either the master or one of the
>> standbys depending on the setting of configurations related to load
>> balancing.
>> You could know which database server pgpool routes queries by using
>> log_per_node_statement.
> Is it not true that transactions are atomic?  If that is true then how can multiple queries be dissected as such?  It’s not really atomic if you can decide which transaction queries go where?

Atomicity? Because pgpool-II sends all write queries to the master
node, all transactions including write queries are executed in atomic

Even if a transaction includes read query it will be executed so that
it does not break the atomicity.

READ query; --- might be sent to the standby node
WRITE query; -- from now on all queries will be sent to the master node
READ query; -- sent to the master node
WRITE query; -- sent to the master node

Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

More information about the pgpool-general mailing list