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:11:49
Message-ID: E1uu54P-0018JU-0m@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
------
V4_4_STABLE

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

Modified Files
--------------
src/main/pgpool_main.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2025-09-04 08:11:55 pgpool: Fix query cache lock file handling.
Previous Message Bo Peng 2025-09-01 02:37:24 pgpool: Consider local heartbeat interfaces in watchdog config checks.