[pgpool-committers: 5835] pgpool: Add new method to check temporary table.

Tatsuo Ishii ishii at sraoss.co.jp
Fri Jun 28 15:24:17 JST 2019


Add new method to check temporary table.

Checking temporary tables are slow because it needs to lookup system
catalogs. To eliminate the lookup, new method to trace CREATE TEMP
TABLE/DROP TABLE is added. For this purpose a linked list is added to
session context. In the list, information of creating/dropping temp
tables (not yet committed) and created/dropped temp tables (committed
or aborted) is kept. By looking up the list, it is possible to decide
whether given table is a temporary or not.

However it is impossible to trace the table creation in functions and
triggers. thus the new method does not completely replace existing
method and choice of method are given by changing check_temp_table
type from boolean to string.

"catalog": existing method (catalog lookup, same as check_temp_table = on)
"trace":   the proposed new way
"none":    no temp table checking (same as check_temp_table = off)

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/misc-config.sgml                      |  41 ++--
src/config/pool_config_variables.c                 |  28 ++-
src/context/pool_session_context.c                 | 210 +++++++++++++++++++++
src/include/context/pool_session_context.h         |  25 +++
src/include/pool_config.h                          |   9 +-
src/protocol/CommandComplete.c                     |  64 ++++++-
src/protocol/pool_proto_modules.c                  |   5 +
src/sample/pgpool.conf.sample                      |  10 +-
src/sample/pgpool.conf.sample-logical              |  10 +-
src/sample/pgpool.conf.sample-master-slave         |  10 +-
src/sample/pgpool.conf.sample-replication          |  10 +-
src/sample/pgpool.conf.sample-stream               |  10 +-
.../regression/tests/026.temp_table/expected.txt   | 100 ++++++++++
.../regression/tests/026.temp_table/temp_table.sql |  39 ++++
src/test/regression/tests/026.temp_table/test.sh   |  30 +++
src/utils/pool_select_walker.c                     |  22 ++-
16 files changed, 563 insertions(+), 60 deletions(-)



More information about the pgpool-committers mailing list