Hi, On 2021-05-25 14:46:27 +0900, Michael Paquier wrote: > That would work. Your suggestion, as I understood it first, makes the > code simpler by not using tup_values at all as the set of values[] is > filled when the values and nulls are extracted. So I have gone with > this simplification, and applied the patch (moved a bit the comments > while on it).
Hm. memsetting values_free() to zero repeatedly isn't quite free, nor is iterating over all columns one more time. Note that values/isnull are passed in, and allocated with an accurate size, so it's a bit odd to then do a pessimally sized stack allocation. Efficiency aside, that just seems a bit weird? The efficiency bit is probably going to be swamped by the addition of the compression handling, given the amount of additional work we're now doing in in reform_and_rewrite_tuple(). I wonder if we should check how much slower a VACUUM FULL of a table with a few varlena columns has gotten vs 13. Greetings, Andres Freund