On Tue, 16 Jul 2024 at 00:13, Matthias van de Meent <boekewurm+postg...@gmail.com> wrote: > > On Tue, 2 Jul 2024 at 02:23, David Rowley <dgrowle...@gmail.com> wrote: > > I'm happy to keep going with this version of the patch > > +1, go for it.
I've attached an updated patch series which are a bit more polished than the last set. I've attempted to document the distinction between FormData_pg_attribute and the abbreviated struct and tried to give an indication of which one should be used. Apart from that, changes include: * I pushed the v1-0001 patch, so that's removed from the patch series. * Rename TupleDescDeformAttr struct. It's now called CompactAttribute. * Rename TupleDescDeformAttr() macro. It's now called TupleDescCompactAttr() * Other macro renaming. e.g. ATT_IS_PACKABLE_FAST to COMPACT_ATTR_IS_PACKABLE * In 0003, renamed CompactAttribute.attalign to attalignby to make it easier to understand the distinction between the align char and the number of bytes. * Added 0004 patch to remove pg_attribute.attcacheoff. There are a few more things that could be done to optimise a few more things. For example, a bunch of places still use att_align_nominal(). With a bit more work, these could use att_nominal_alignby(). I'm not yet sure of the cleanest way to do this. Adding alignby to the typecache might be one way, or maybe just a function that converts the attalign to the number of bytes. This would be useful in all places where att_align_nominal() is used in loops, as converting the char to the number of bytes would only be done once rather than once per loop. I feel like this patch series is probably big enough for now, so I'd like to opt for those improvements to take place as follow-on work. I'll put this up for the CF bot to run with for a bit as the patch has needed a rebase since I pushed the v1-0001 patch. David
v2-0001-Move-TupleDesc.attrs-out-of-line.patch
Description: Binary data
v2-0002-Introduce-CompactAttribute-array-in-TupleDesc.patch
Description: Binary data
v2-0003-Optimize-alignment-calculations-in-tuple-form-def.patch
Description: Binary data
v2-0004-Remove-pg_attribute.attcacheoff-column.patch
Description: Binary data