[pgpool-committers: 2842] 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_3_STABLE

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

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