From 6d533122e4e28c4a728f5257fbdf2dd27ae1d724 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Fri, 25 Apr 2025 17:23:16 +0300 Subject: [PATCH] Address review comments --- pgxn/neon/file_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgxn/neon/file_cache.c b/pgxn/neon/file_cache.c index c64db2fa35..7b327ea84e 100644 --- a/pgxn/neon/file_cache.c +++ b/pgxn/neon/file_cache.c @@ -774,7 +774,7 @@ lfc_prewarm(FileCacheState* fcs, uint32 n_workers) worker.bgw_restart_time = BGW_NEVER_RESTART; strcpy(worker.bgw_library_name, "neon"); strcpy(worker.bgw_function_name, "lfc_prewarm_main"); - sprintf(worker.bgw_name, "LFC prewarm worker %d", i+1); + snprintf(worker.bgw_name, BGW_MAXLEN, "LFC prewarm worker %d", i+1); strcpy(worker.bgw_type, "LFC prewarm worker"); worker.bgw_main_arg = Int32GetDatum(i); /* must set notify PID to wait for shutdown */ @@ -1860,7 +1860,7 @@ neon_get_lfc_stats(PG_FUNCTION_ARGS) value = lfc_blocks_per_chunk; break; case 9: - key = "file_cache_pinned"; + key = "file_cache_chunks_pinned"; if (lfc_ctl) value = lfc_ctl->pinned; break;