From d6ec1f1a1c6d8b1e8e7c49f9fa1776803b734690 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Sat, 5 Jul 2025 12:58:01 +0300 Subject: [PATCH] Skip legacy LFC initialization when communicator is used It clashes with the initialization of the LFC file --- pgxn/neon/file_cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pgxn/neon/file_cache.c b/pgxn/neon/file_cache.c index 4aecaff3d9..64e4a90588 100644 --- a/pgxn/neon/file_cache.c +++ b/pgxn/neon/file_cache.c @@ -230,6 +230,8 @@ lfc_switch_off(void) { int fd; + Assert(!neon_enable_new_communicator); + if (LFC_ENABLED()) { HASH_SEQ_STATUS status; @@ -295,6 +297,8 @@ lfc_maybe_disabled(void) static bool lfc_ensure_opened(void) { + Assert(!neon_enable_new_communicator); + if (lfc_generation != lfc_ctl->generation) { lfc_close_file(); @@ -320,6 +324,8 @@ lfc_shmem_startup(void) bool found; static HASHCTL info; + Assert(!neon_enable_new_communicator); + if (prev_shmem_startup_hook) { prev_shmem_startup_hook(); @@ -618,6 +624,9 @@ lfc_init(void) if (lfc_max_size == 0) return; + if (neon_enable_new_communicator) + return; + prev_shmem_startup_hook = shmem_startup_hook; shmem_startup_hook = lfc_shmem_startup; #if PG_VERSION_NUM>=150000