From b3cd883f93e63d9dab6f3ac8e6e8e3f697c14c29 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Thu, 2 Jan 2025 14:28:15 +0300 Subject: [PATCH] Unlock LFC mutex when LFC cache is disabled (#10235) ## Problem See https://github.com/neondatabase/neon/issues/10233 `lfc_containsv` returns with holding lock when LFC was disabled. This bug was introduced in commit 78938d1b59 ## Summary of changes Release lock before return. Co-authored-by: Konstantin Knizhnik --- pgxn/neon/file_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pgxn/neon/file_cache.c b/pgxn/neon/file_cache.c index f49415be6869..ad5667cbab1c 100644 --- a/pgxn/neon/file_cache.c +++ b/pgxn/neon/file_cache.c @@ -541,6 +541,7 @@ lfc_cache_containsv(NRelFileInfo rinfo, ForkNumber forkNum, BlockNumber blkno, } else { + LWLockRelease(lfc_lock); return found; }