Re: Amcheck verification of GiST and GIN
Mark Dilger <mark.dilger@enterprisedb.com>
Attachments
- v36-0001-A-tiny-nitpicky-tweak-to-beautify-the-Amcheck-in.patch (application/octet-stream) patch v36-0001
- v36-0002-Refactor-amcheck-internals-to-isolate-common-loc.patch (application/octet-stream) patch v36-0002
- v36-0003-Add-gin_index_check-to-verify-GIN-index.patch (application/octet-stream) patch v36-0003
- v36-0004-Fix-wording-in-GIN-README.patch (application/octet-stream) patch v36-0004
- v36-0005-Fix-for-gin_index_check.patch (application/octet-stream) patch v36-0005
- v36-0006-Add-gin-index-checking-test-for-jsonb-data.patch (application/octet-stream) patch v36-0006
- v36-0007-Add-gin-to-the-create-index-concurrently-tap-tes.patch (application/octet-stream) patch v36-0007
- v36-0008-Stress-test-verify_gin-using-pgbench.patch (application/octet-stream) patch v36-0008
- (unnamed) (text/plain)
> On Feb 21, 2025, at 9:07 AM, Mark Dilger <mark.dilger@enterprisedb.com> wrote: > > I infer that you intend to make v34-0004, v34-0006, and v35-0001 apply cleanly without the other patches and commit it that way. If that is correct, be advised that I'm doing a review and will respond back shortly, maybe in a few hours. Ok, here is my review: v34-0001 looks fine v34-0002 refactoring is needed by the gin patches, so I kept it in the patchset for review purposes v34-0004 can mostly be applied without v34-0003, but a few changes are needed to make it apply cleanly. v34-0006 looks fine v35-0001 applies cleanly I find the token quoting and capitalization patterns in sql/check_gin.sql somewhat confusing, but I tried to follow what is already there in extending that test to also check gin indexes over jsonb data using jsonb_path_ops. I think this is a common enough usage of gin that we should have test coverage for it. After extending the test a bit, I ran the tests and checked lcov: verify_common.c 86.3% verify_gin.c 38.4% verify_heapam.c 57.2% verify_nbtree.c 72.4% Showing that verify_gin has the least coverage of all. The main areas lacking coverage have to do with posting list trees and concurrent page splits never being exercised. My first attempt cover that with a TAP test using pgbench got the number up to 56.8%, but while trying to get that higher, I started getting error reports from verify_gin(), apparently out of function gin_check_parent_keys_consistency(): # at t/006_gin_concurrency.pl line 137. # 'pgbench: error: client 14 script 1 aborted in command 0 query 0: ERROR: index "ginidx" has wrong tuple order on entry tree page, block 153, offset 8 # pgbench: error: client 0 script 1 aborted in command 0 query 0: ERROR: index "ginidx" has wrong tuple order on entry tree page, block 153, offset 8 # pgbench: error: client 12 script 1 aborted in command 0 query 0: ERROR: index "ginidx" has wrong tuple order on entry tree page, block 153, offset 8 # pgbench: error: client 7 script 1 aborted in command 0 query 0: ERROR: index "ginidx" has wrong tuple order on entry tree page, block 153, offset 8 # pgbench: error: client 1 script 1 aborted in command 0 query 0: ERROR: index "ginidx" has wrong tuple order on entry tree page, block 153, offset 8 <MORE LINES LIKE THE ABOVE SNIPPED> The pgbench script is not corrupting anything overtly, so this looks to either be a bug in gin or a bug in the check. I am including a patchset with the original patches reworked plus the extra test cases. For completeness, I also added gin indexes to t/002_cic.pl and t/003_cic_2pc.pl.
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
amcheck: Fix posting tree checks in gin_index_check()
- 0cf205e122ae 18.0 landed
-
amcheck: Fix parent key check in gin_index_check()
- cdd1a431f21d 18.0 landed
-
amcheck: Fix checks of entry order for GIN indexes
- 0b54b392334b 18.0 landed
-
amcheck: Remove unused GinScanItem->parentlsn field
- 8dd41c0bff5b 18.0 landed
-
amcheck: Test gin_index_check on a multicolumn index
- c89d6b889ce9 18.0 landed
-
Remove incidental md5() function use from test
- 49b82522f13f 18.0 landed
-
amcheck: Add a GIN index to the CREATE INDEX CONCURRENTLY tests
- 68f97aeadb8e 18.0 landed
-
amcheck: Add a test with GIN index on JSONB data
- ca738bdc4c9d 18.0 landed
-
amcheck: Fix indentation in verify_gin.c
- ec4327d106be 18.0 landed
-
amcheck: Add gin_index_check() to verify GIN index
- 14ffaece0fb5 18.0 landed
-
amcheck: Move common routines into a separate module
- d70b17636ddf 18.0 landed
-
Fix grammar in GIN README
- fb9dff76635d 18.0 landed
-
Avoid amcheck inline compression false positives.
- eba775345d23 12.0 cited