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 05:59:26 +0000 (14:59 +0900)
commit09cd631edb0f962403a503ff02bdbea739de40e8
treebff178234fefc7752b8d07452b5d708fa4e170e4
parentb9e7b42458963f1d731a0c45f9eb708fe296405b
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