Add battery of tests related TOAST tables with oid8 The tests added by this commit cover a large ground in terms of the introduction of oid8 in TOAST tables, with the following areas covered, with all the gaps found during the development of the feature: - Tables with oid8 TOAST tables in general, under strings.sql. - ALTER TABLE with attribute manipulations in transactions and different toast_table_value settings. - Relation rewrites, not affecting the TOAST relation after initial creation with VACUUM FULL, CLUSTER, REPACK. - pg_column_compression(). - test_decoding, for external and extended TOAST data. - amcheck, external and extended storage with heap checked. - UPDATE with out-of-line datums that belongs to another TOAST table. This offers coverage for toast_tuple_init(), where external vartags could be mixed once multiple on-disk external TOAST pointers can co-exist. This pattern can be triggered with asan/ubsan, with an out-of-bound memcpy when unpatched.
These tests are added before the new vartag_external, mostly as a matter of avoiding dead code in the tree. Author: Michael Paquier <[email protected]> Reviewed-by: Greg Burd <[email protected]> Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: Yugo Nagata <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c68cba09dd7fb2cca1fdddfcf8e0fe206e97a8a4 Modified Files -------------- contrib/amcheck/expected/check_heap.out | 40 +++ contrib/amcheck/sql/check_heap.sql | 27 ++ contrib/test_decoding/expected/toast.out | 39 +++ contrib/test_decoding/sql/toast.sql | 20 ++ src/test/regress/expected/compression.out | 41 ++++ src/test/regress/expected/strings.out | 394 +++++++++++++++++++++++++++--- src/test/regress/sql/compression.sql | 22 ++ src/test/regress/sql/strings.sql | 241 ++++++++++++++---- 8 files changed, 746 insertions(+), 78 deletions(-)
