[pgpool-committers: 2624] pgpool: Fix inconsistency of sequence values in replication mode
Yugo Nagata
nagata at sraoss.co.jp
Wed Aug 19 17:24:54 JST 2015
Fix inconsistency of sequence values in replication mode
Due to the following commit, table names were always quoted
in queries to check needs for insert lock, whether this is
view, wheter this has default value of timestamp etc. However,
when schema name was provided, table name was quoted wrongly as
like "public.tbl" instead of "public"."tbl". So, pool_regclass
and to_regclass couldn't find right talbe oid and insert lock
was never executed. This caused inconsistency between DB nodes.
In previous codes, quotation marks "" are once remove from
table name returnd by nodeToString, and re-quoted in issued
query. Instead, fixed codes don't remove and use directy in
pgpool_regclass or to_regclass. make_table_from_rangevar()
are also fixed to return table name including quotation marks.
However, when neither pgool_regclass or to_regclass is available,
quotation marks and schema name are removed from table name,
because pg_class.relname is used in this case.
In addition, fix to use to_regclass in insert lock functions
if available.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=21ee06028ec1e3cebacd81304ecc0486f724eea7
Modified Files
--------------
src/include/protocol/protocol_defs.h | 2 +
src/include/utils/pool_relcache.h | 1 +
src/protocol/pool_process_query.c | 69 +++++++++++++++++--------------
src/rewrite/pool_timestamp.c | 10 +++--
src/utils/pool_relcache.c | 48 +++++++++++++---------
src/utils/pool_select_walker.c | 74 ++++++++++++++++------------------
6 files changed, 111 insertions(+), 93 deletions(-)
More information about the pgpool-committers
mailing list