pgpool2.git / summary / log / commit / refs

commit    24755985692be577bdcf487ebddb2c2ff6116661
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Tue Apr 07 02:38:08 2026 +0000

    Fix query cache to invalidate cache when MERGE statement is used.
    
    MERGE was introduced in PostgreSQL 15 and Pgpool-II 4.4 imported 15's
    parer.  However, there was an oversight in query cache sub module:
    i.e.  MERGE statement did not trigger invalidation of query cache.
    
    Author: Nadav Shatz <nadav@tailorbrands.com>
    Discussion: https://www.postgresql.org/message-id/20260407.090802.1335576118037412011.ishii%40postgresql.org
    Backpatch-through: v4.4 where MERGE was introduced


src/query_cache/pool_memqcache.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c index f38f71146..bdd89eacc 100644 --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -3,7 +3,7 @@ * pgpool: a language independent connection pool server for PostgreSQL * written by Tatsuo Ishii * - * Copyright (c) 2003-2025 PgPool Global Development Group + * Copyright (c) 2003-2026 PgPool Global Development Group * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby @@ -1305,6 +1305,12 @@ pool_extract_table_oids(Node *node, int **oidsp) } return num_oids; } + else if (IsA(node, MergeStmt)) + { + MergeStmt *stmt = (MergeStmt *) node; + + table = make_table_name_from_rangevar(stmt->relation); + } else if (IsA(node, ExplainStmt)) { ListCell *cell; [parent: 2f1a69681580]