Re: [HACKERS] A design for amcheck heapam verification - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: [HACKERS] A design for amcheck heapam verification
Date
Msg-id B0C6B39F-EEDA-4D04-A089-F808EA74C7A8@yandex-team.ru
Whole thread Raw
In response to Re: [HACKERS] A design for amcheck heapam verification  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [HACKERS] A design for amcheck heapam verification  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Hi, Peter!

> 8 февр. 2018 г., в 4:56, Peter Geoghegan <pg@bowt.ie> написал(а):
>
> * Faster modulo operations.
> ....
> * Removed sdbmhash().

Thanks! I definitely like how Bloom filter is implemented now.

I could not understand meaning of this, but apparently this will not harm
+    /*
+     * Caller will probably use signed 32-bit pseudo-random number, so hash
+     * caller's value to get 64-bit seed value
+     */
+    filter->seed = DatumGetUInt64(hash_uint32_extended(seed, 0));
I do not see a reason behind hashing the seed.

Also, I'd like to reformulate this paragraph. I understand what you want to say, but the sentence is incorrect.
+ * The Bloom filter behaves non-deterministically when caller passes a random
+ * seed value.  This ensures that the same false positives will not occur from
+ * one run to the next, which is useful to some callers.
Bloom filter behaves deterministically, but differently. This does not ensures any thing, but probably will give
somethingwith hight probability. 

Thanks!

Best regards, Andrey Borodin.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)
Next
From: Dmitry Dolgov
Date:
Subject: Re: JIT compiling with LLVM v10.0