From ccab7d0234c53dacea04c7d04f1ef840cb0afe24 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Sun, 19 Jan 2025 08:54:57 +0200 Subject: [PATCH] Store prefetch results in LFC cache once as soon as they are received --- pgxn/neon/file_cache.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pgxn/neon/file_cache.c b/pgxn/neon/file_cache.c index 8c2990e57a..a270db1ecb 100644 --- a/pgxn/neon/file_cache.c +++ b/pgxn/neon/file_cache.c @@ -109,7 +109,11 @@ typedef enum FileCacheBlockState UNAVAILABLE, /* block is not present in cache */ AVAILABLE, /* block can be used */ PENDING, /* block is loaded */ +<<<<<<< HEAD REQUESTED /* some other backend is waiting for block to be loaded */ +======= + REQUESTED /* some other backend is waiting for block to be loaded */ +>>>>>>> dde427c35 (Store prefetch results in LFC cache once as soon as they are received) } FileCacheBlockState; @@ -223,6 +227,12 @@ lfc_switch_off(void) else close(fd); +<<<<<<< HEAD +======= + if (rc < 0) + elog(WARNING, "Failed to truncate local file cache %s: %m", lfc_path); + } +>>>>>>> dde427c35 (Store prefetch results in LFC cache once as soon as they are received) /* Wakeup waiting backends */ for (int i = 0; i < N_COND_VARS; i++) ConditionVariableBroadcast(&lfc_ctl->cv[i]);