From b57848236fe49caf3c877add1e3291626ef3abe4 Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 22 Dec 2023 11:53:09 +0000 Subject: [PATCH] pgxn: fix stripe calculation --- pgxn/neon/libpagestore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgxn/neon/libpagestore.c b/pgxn/neon/libpagestore.c index 39ed892cb2..94ea7901fa 100644 --- a/pgxn/neon/libpagestore.c +++ b/pgxn/neon/libpagestore.c @@ -224,10 +224,10 @@ get_shard_number(BufferTag* tag) #if PG_MAJORVERSION_NUM < 16 hash = murmurhash32(tag->rnode.relNode); - hash = hash_combine(hash, murmurhash32(tag->blockNum/(MB/BLCKSZ)/stripe_size)); + hash = hash_combine(hash, murmurhash32(tag->blockNum/stripe_size)); #else hash = murmurhash32(tag->relNumber); - hash = hash_combine(hash, murmurhash32(tag->blockNum/(MB/BLCKSZ)/stripe_size)); + hash = hash_combine(hash, murmurhash32(tag->blockNum/stripe_size)); #endif return hash % n_shards;