]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add regression test for short varlenas saved in TOAST relations
authorMichael Paquier <michael@paquier.xyz>
Wed, 6 Aug 2025 08:22:03 +0000 (17:22 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 6 Aug 2025 08:22:03 +0000 (17:22 +0900)
commit225ebfe30a1ae9fda74f3d8f98ea6fa511b60624
tree8e31e4003b7bdf3b4a034ff1e97b64e3572d06f4
parent0b6aea03843dc75871b0490c6302a71a8fecb53d
Add regression test for short varlenas saved in TOAST relations

toast_save_datum() has for a very long time some code able to handle
short varlenas (values up to 126 bytes reduced to a 1-byte header),
converting such varlenas to an external on-disk TOAST pointer with the
value saved uncompressed in the secondary TOAST relation.

There was zero coverage for this code path.  This commit adds a test
able to exercise it, relying on two external attributes, one with a low
toast_tuple_target, so as it is possible to trigger the threshold for
the insertion of short varlenas into the TOAST relation.

Author: Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>
Co-authored-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aJAl7-NvIk0kZByz@paquier.xyz
src/test/regress/expected/strings.out
src/test/regress/sql/strings.sql