8000 Fix entry size · postgrespro/aqo@215ca8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 215ca8e

Browse files
author
Alexandra Pervushina
committed
Fix entry size
1 parent 9c543e3 commit 215ca8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aqo_shared.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ aqo_init_shmem(void)
242242
&info, HASH_ELEM | HASH_BLOBS);
243243

244244
/* Shared memory hash table for fss neighbours */
245-
info.keysize = sizeof(int64);
246-
info.entrysize = sizeof(DataEntry *);
245+
info.keysize = sizeof(((NeighboursEntry *) 0)->fss);
246+
info.entrysize = sizeof(NeighboursEntry);
247247
fss_neighbours = ShmemInitHash("AQO fss neighbours HTAB", fss_max_items, fss_max_items,
248248
&info, HASH_ELEM | HASH_BLOBS);
249249

storage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,8 +2202,8 @@ aqo_neighbours_reset(void)
22022202

22032203
LWLockRelease(&aqo_state->neighbours_lock);
22042204

2205-
// if (num_remove != num_entries)
2206-
// elog(ERROR, "[AQO] Neighbours memory storage is corrupted or parallel access without a lock has detected.");
2205+
if (num_remove != num_entries)
2206+
elog(ERROR, "[AQO] Neighbours memory storage is corrupted or parallel access without a lock has detected.");
22072207

22082208
aqo_neighbours_flush();
22092209

0 commit comments

Comments
 (0)
0