pgpool: Fix query cache lock file handling.

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Fix query cache lock file handling.
Date: 2025-09-04 08:12:06
Message-ID: E1uu54f-0018OC-2i@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Fix query cache lock file handling.

Query cache module creates a lock file under logdir for concurrency
control. However, there were bugs in the handling:

1) Garbage file "QUERY_CACHE_LOCK_FILE" was created by pgpool main
process.

2) The lock file was not removed upon pgpool shutdown.

This commit fixes the bugs.

Author: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Reported-by: Bo Peng <pengbo(at)sraoss(dot)co(dot)jp>
Reviewed-by: Bo Peng <pengbo(at)sraoss(dot)co(dot)jp>
Backpatch-through: v4.4

Branch
------
master

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

Modified Files
--------------
src/main/pgpool_main.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2025-09-05 09:20:04 pgpool: Fix query cache when pgpool is built without memcached.
Previous Message Tatsuo Ishii 2025-09-04 08:12:00 pgpool: Fix query cache lock file handling.