From bd9ca0b4a2a0caceb3d62f938240e31a2ba4075f Mon Sep 17 00:00:00 2001
From: Timur Magomedov <t.magomedov@postgrespro.ru>
Date: Fri, 30 May 2025 20:52:41 +0300
Subject: [PATCH 4/4] Fixed segfault in case there is no hottable

---
 contrib/vci/executor/vci_agg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/vci/executor/vci_agg.c b/contrib/vci/executor/vci_agg.c
index 1c558de7dc6..269c249efaa 100644
--- a/contrib/vci/executor/vci_agg.c
+++ b/contrib/vci/executor/vci_agg.c
@@ -623,7 +623,7 @@ lookup_hash_entry_vector(VciAggState *aggstate,
 									 hashslot,
 									 &isnew,
 									 NULL);
-		hashcxt = aggstate->hottable->tablecxt;
+		hashcxt = aggstate->hashtable->tablecxt;
 #ifdef VCI_ENABLE_HOT_HASH_TABLE
 found_hot_table:
 #endif
-- 
2.43.0

