Fix query cache lock file handling.
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 4 Sep 2025 05:59:26 +0000 (14:59 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 4 Sep 2025 08:00:10 +0000 (17:00 +0900)
commit1f29d3b37f7b3a94852718694c6143dc35d38155
tree3a7a14ccf64633500376e76f5106198d09b34c71
parentc640599c7e2e1e45933764e6d2336766821262ac
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@postgresql.org>
Reported-by: Bo Peng <pengbo@sraoss.co.jp>
Reviewed-by: Bo Peng <pengbo@sraoss.co.jp>
Backpatch-through: v4.4
src/main/pgpool_main.c