Re: new heapcheck contrib module
Peter Geoghegan <pg@bowt.ie>
On Mon, Apr 20, 2020 at 1:40 PM Robert Haas <robertmhaas@gmail.com> wrote: > On Mon, Apr 20, 2020 at 4:30 PM Andres Freund <andres@anarazel.de> wrote: > > A few billion CLogTruncationLock acquisitions in short order will likely > > have at least as big an impact as ShareUpdateExclusiveLock held for the > > duration of the check. That's not really a relevant concern or > > txid_status(). Per-tuple lock acquisitions aren't great. > > Yeah, that's true. Doing it for every tuple is going to be too much, I > think. I was hoping we could avoid that. What about the visibility map? It would be nice if pg_visibility was merged into amcheck, since it mostly provides integrity checking for the visibility map. Maybe we could just merge the functions that perform verification, and leave other functions (like pg_truncate_visibility_map()) where they are. We could keep the current interface for functions like pg_check_visible(), but also allow the same verification to occur in passing, as part of a higher level check. It wouldn't be so bad if pg_visibility was an expert-only tool. But ISTM that the verification performed by code like collect_corrupt_items() could easily take place at the same time as the new checks that Mark proposes. Possibly only some of the time. It can work in a totally additive way. (Though like Andres I don't really like the current "helper" functions used to iterate through a heap relation; they seem like they'd make this harder.) -- Peter Geoghegan
Commits
-
Add pg_amcheck, a CLI for contrib/amcheck.
- 9706092839db 14.0 landed
-
Refactor and generalize the ParallelSlot machinery.
- f71519e545a3 14.0 landed
-
Generalize parallel slot result handling.
- 418611c84d00 14.0 landed
-
Move some code from src/bin/scripts to src/fe_utils to permit reuse.
- e955bd4b6c2b 14.0 landed
-
Factor pattern-construction logic out of processSQLNamePattern.
- 2c8726c4b0a4 14.0 landed
-
Doc: clean up verify_heapam() documentation.
- 4c49d8fc15ee 14.0 landed
-
Fix more portability issues in new amcheck code.
- 321633e17b07 14.0 landed
-
Fix portability issues in new amcheck test.
- 860593ec3bd1 14.0 landed
-
Try to avoid a compiler warning about using fxid uninitialized.
- 8bb0c9770e80 14.0 landed
-
Extend amcheck to check heap pages.
- 866e24d47db1 14.0 landed
-
Adjust walsender usage of xlogreader, simplify APIs
- 850196b610d2 13.0 cited
-
Improve checking of child pages in contrib/amcheck.
- d114cc538715 13.0 cited
-
Sanitize line pointers within contrib/amcheck.
- a9ce839a3137 12.0 cited
-
Fix possible sorting error when aborting use of abbreviated keys.
- 008c4135ccf6 10.0 cited