Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 63ef12f

Browse files
author
Alexandra Pervushina
committed
Fix entry size
1 parent 340060e commit 63ef12f

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
@@ -244,8 +244,8 @@ aqo_init_shmem(void)
244244
&info, HASH_ELEM | HASH_BLOBS);
245245

246246
/* Shared memory hash table for fss neighbours */
247-
info.keysize = sizeof(int64);
248-
info.entrysize = sizeof(DataEntry *);
247+
info.keysize = sizeof(((NeighboursEntry *) 0)->fss);
248+
info.entrysize = sizeof(NeighboursEntry);
249249
fss_neighbours = ShmemInitHash("AQO fss neighbours HTAB", fss_max_items, fss_max_items,
250250
&info, HASH_ELEM | HASH_BLOBS);
251251

storage.c

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

22042204
LWLockRelease(&aqo_state->neighbours_lock);
22052205

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

22092209
aqo_neighbours_flush();
22102210

0 commit comments

Comments
 (0)