GiST produces wal_consistency_checking complaints whenever a XLOG_GIST_DELETE record is replayed. The immediate problem is that F_TUPLES_DELETED is set (set, *not* unset) within gistRedoDeleteRecord, even though we do nothing with XLOG_GIST_DELETE at the corresponding point of original execution, in gistprunepage. The more fundamental problem is that we're using F_TUPLES_DELETED for anything at all.
The purpose of XLOG_GIST_DELETE relates in some way to old style VACUUM FULL. It's obviously useless now: there are 3 places that set F_TUPLES_DELETED, but nothing ever tests whether it is set in any GiST page's opaque area's flags field (barring pageinspect). Attached patch marks F_TUPLES_DELETED deprecated, removes all of its helper function-style macros, and removes all remaining callers of those macros. -- Peter Geoghegan
v1-0001-GiST-Deprecate-F_TUPLES_DELETED.patch
Description: Binary data
