Restore lost amcheck TOAST test coverage.
authorPeter Geoghegan
Fri, 31 Jul 2020 22:34:25 +0000 (15:34 -0700)
committerPeter Geoghegan
Fri, 31 Jul 2020 22:34:25 +0000 (15:34 -0700)
commit16c977906e92673b22a05bc80e9a53d023cdd79b
tree8150f31f46b2b31f2d9ae768486b4cf47c8702aa
parent70248d8f5b533e0fa045cfc67f623366cdaec9e0
Restore lost amcheck TOAST test coverage.

Commit eba77534 fixed an amcheck false positive bug involving
inconsistencies in TOAST input state between table and index.  A test
case was added that verified that such an inconsistency didn't result in
a spurious corruption related error.

Test coverage from the test was accidentally lost by commit 501e41dd,
which propagated ALTER TABLE ...  SET STORAGE attstorage state to
indexes.  This broke the test because the test specifically relied on
attstorage not being propagated.  This artificially forced there to be
index tuples whose datums were equivalent to the datums in the heap
without the datums actually being bitwise equal.

Fix this by updating pg_attribute directly instead.  Commit 501e41dd
made similar changes to a test_decoding TOAST-related test case which
made the same assumption, but overlooked the amcheck test case.

Backpatch: 11-, just like commit eba77534 (and commit 501e41dd).
contrib/amcheck/expected/check_btree.out
contrib/amcheck/sql/check_btree.sql