Re: Missing update of all_hasnulls in BRIN opclasses
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Matthias van de Meent <boekewurm+postgres@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2022-12-30T00:18:36Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-handling-of-NULLs-in-BRIN-summaries-20221230.patch (text/x-patch) patch 0001
Hi, here's an improved and cleaned-up version of the fix. I removed brinbugs.sql from pageinspect, because it seems enough to have the other tests (I added brinbugs first, before realizing those exist). This also means meson.build is fine and there are no tests doing CREATE EXTENSION concurrently etc. I decided to go with the 0003 approach, which stores summaries for empty ranges. That seems to be less intrusive (it's more like what we do now), and works better for tables with a lot of bulk deletes. It means we can have ranges with allnulls=hasnulls=true, which wasn't the case before, but I don't see why this should break e.g. custom opclasses (if it does, it probably means the opclass is wrong). Finally, I realized union_tuples needs to be tweaked to deal with empty ranges properly. The changes are fairly limited, though. I plan to push this into master right at the beginning of January, and then backpatch a couple days later. I still feel a bit uneasy about tweaking this, but I don't think there's a better way than reusing the existing flags. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Show empty BRIN ranges in brin_page_items
- 428c0cae929b 16.0 landed
-
Fix handling of empty ranges and NULLs in BRIN
- 3581cbdcd64f 16.0 landed
- fc7dc728d1a6 11.21 landed
- d78a66d92c73 12.16 landed
- e187693239ad 15.4 landed
- 40d465cafce0 14.9 landed
- 6c512fc6e90d 13.12 landed
-
Fix handling of NULLs when merging BRIN summaries
- b511d7323df6 11.21 landed
- d42ffda685f5 12.16 landed
- 2b1ab28b9dc9 13.12 landed
- 3f1356e5d60a 14.9 landed
- 80f64b90088a 15.4 landed
- 3ec8a3bfb547 16.0 landed
-
Move IS [NOT] NULL handling from BRIN support functions
- 72ccf55cb99c 14.0 cited