Re: A design for amcheck heapam verification
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-30T12:02:10Z
Lists: pgsql-hackers
Peter Geoghegan wrote: > > Your patch brings us one step closer to that goal. (The book says > > that this approach is good far sparse bitsets, but your comment says > > that we expect something near 50%. That's irrelevant anyway since a > > future centralised popcount() implementation would do this in > > word-sized chunks with a hardware instruction or branch-free-per-word > > lookups in a table and not care at all about sparseness.) > > I own a copy of Hacker's Delight (well, uh, Daniel Farina lent me his > copy about 2 years ago!). pop()/popcount() does seem like a clever > algorithm, that we should probably think about adopting in some cases, > but I should point at that the current caller to my > bloom_prop_bits_set() function is an elog() DEBUG1 call. This is not > at all performance critical. Eh, if you want to optimize it for the case where debug output is not enabled, make sure to use ereport() not elog(). ereport() short-circuits evaluation of arguments, whereas elog() does not. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix non-portable use of round().
- 686d399f2be6 11.0 landed
-
Add amcheck verification of heap relations belonging to btree indexes.
- 7f563c09f890 11.0 landed
-
Add Bloom filter implementation.
- 51bc271790eb 11.0 landed
-
Use ereport not elog for some corrupt-HOT-chain reports.
- 8ecdc2ffe3da 11.0 cited
-
Introduce 64-bit hash functions with a 64-bit seed.
- 81c5e46c490e 11.0 cited
-
Upgrade src/port/rint.c to be POSIX-compliant.
- 06bf0dd6e354 9.5.0 cited
-
Use type "int64" for memory accounting in tuplesort.c/tuplestore.c.
- 79e0f87a1564 9.4.0 cited