Re: Make tuple deformation faster
Victor Yegorov <vyegorov@gmail.com>
From: Victor Yegorov <vyegorov@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-02T14:03:55Z
Lists: pgsql-hackers
Attachments
- deform-v5.jpeg (image/jpeg)
пн, 2 дек. 2024 г. в 13:24, David Rowley <dgrowleyml@gmail.com>: > I ended up adjusting the code here so that TupleDescSize() returns the > full size and TupleDescAttrAddress() manually calculates the offset to > start the FormData_pg_attribute array. That allows > TupleDescFullSize() to be deleted. I changed how TupleDescCopy() > works as it used to perform the memcpy in 2 parts. I've changed that > to now perform a single memcpy() and reset the ->attrs field after the > memcpy so that it correctly points to the address for its own > TupleDesc rather than the one from the source. > > Nice! > I've attached a v5 set of patches, which I think addresses everything > you mentioned. I've also shuffled the patches around a little to how > I think they should be committed. > I'm glad that the patch from “More tuple deformation speedups” is moved here, I wanted to mention that both patches should be committed together. All is good, and the benefits are clearly visible (same setup used). -- Victor Yegorov
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix possible Assert failure in verify_compact_attribute()
- 33b06a20016d 18.0 landed
-
Speedup tuple deformation with additional function inlining
- 58a359e585d0 18.0 landed
-
Fix race condition in TupleDescCompactAttr assert code
- 6f3820f37aba 18.0 landed
-
Optimize alignment calculations in tuple form/deform
- db448ce5ad36 18.0 landed
-
Remove pg_attribute.attcacheoff column
- 02a8d0c45253 18.0 landed
-
Introduce CompactAttribute array in TupleDesc, take 2
- 5983a4cffc31 18.0 landed
-
Introduce CompactAttribute array in TupleDesc
- d28dff3f6cd6 18.0 landed
-
Use TupleDescAttr macro consistently
- 65b71dec2d57 18.0 landed