Fix query cache lock file handling.
authorTatsuo Ishii <[email protected]>
Thu, 4 Sep 2025 05:59:26 +0000 (14:59 +0900)
committerTatsuo Ishii <[email protected]>
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 <[email protected]>
Reported-by: Bo Peng <[email protected]>
Reviewed-by: Bo Peng <[email protected]>
Backpatch-through: v4.4
src/main/pgpool_main.c