FWIW my buildfarm animal beetle also runs with wal_consistency_checking, so batta is not the only one. Ofc, beetle did not find this issue either. I think Peter's description of the inconsistency is correct.
This change also overlaps almost exactly with Kirill's earlier "GiST nitpicks I want to discuss (and maybe eventually fix)" thread [0]. His 0001 stopped setting GistTuplesDeleted while retaining F_TUPLES_DELETED for pageinspect and existing on-disk data. Peter's v2 test seems to supply the important missing part. There is also Alexander Lakhin's earlier work on GiST and hash regression coverage [1], including the killtuples tests and WAL coverage. It seems useful to cross-link these discussions. I'm interested in fixing those items. Best regards, Andrey Borodin. [0] https://www.postgresql.org/message-id/flat/CALdSSPgMYKpqkZAx32B2orx0Whev8-ik44oHtVkeDQz%2BhP%3DneA%40mail.gmail.com [1] https://www.postgresql.org/message-id/69ee05f7-8168-cce5-7f2d-d887f0aaf8bd%40gmail.com
