[pgpool-committers: 2839] pgpool: Fix bug with "SET TRANSACTION READ ONLY".

Tatsuo Ishii ishii at postgresql.org
Wed Dec 2 22:00:39 JST 2015


Fix bug with "SET TRANSACTION READ ONLY".

Pgpool-II remembers that non read only queries (including SET) were
executed in an explicit transaction and adds a "writing transaction"
mark to the transaction. The mark affects the query routing behavior
of pgpool-II while running in streaming replication mode. Pgpool-II
starts sending queries to the primary after the mark is set. Because
the effect of writing queries may appear on standbys after some delay
in streaming replication mode, it is safer to route read queries to
the primary after the mark is set.

However there's oversight here. "SET TRANSACTION READ ONLY" does no
data modification and should be treated as an exception.

Per bug #157.

Branch
------
V3_2_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=85e3b242a0829dc1ea6b106b9a13ab779c0824f8

Modified Files
--------------
pool_proto_modules.c |    9 +++++-
pool_query_context.c |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++
pool_query_context.h |    3 +-
3 files changed, 84 insertions(+), 2 deletions(-)



More information about the pgpool-committers mailing list