[Pgpool-general] Read-only explicit transactions

Josh Berkus josh at agliodbs.com
Wed Jul 20 17:21:16 UTC 2011


Toshihiro,

> pgpool determines whether to load-balance or not in the first sentence of
> multi-statement. So if "BEGIN" is the first sentence of multi-statement,
> pgpool can not load-balance it.
> 
> For example, pgpool can load-balance the request if it's the following case:
> 
> BEGIN;
> SELECT ...; SELECT ...; SELECT ...;
> COMMIT;
> 
> pgpool-II 3.0 or later(Master/Slave mode) load-balances queries in
> explicit transactions without special setting.
> 
> However, note that multi-statement must not include write-queries.
> And, each "SELECT" query is sent to the same backend node,
> because pgpool decides a load balancing node in every session.

Well, we're using 3.0.4, and the application controls read-only vs.
read-write pretty well. So I feel confident that I can make the
transactions operate correctly.

You're saying this will just work on 3.0.4?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


More information about the Pgpool-general mailing list