[pgpool-committers: 2843] pgpool: Fix bug with "SET TRANSACTION READ ONLY".
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.
pool_proto_modules.c | 9 ++++++
pool_query_context.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++-
pool_query_context.h | 3 +-
3 files changed, 86 insertions(+), 2 deletions(-)
More information about the pgpool-committers