Re: Make tuple deformation faster
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Andres Freund <andres@anarazel.de>, Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-05T12:07:21Z
Lists: pgsql-hackers
Attachments
- deform_test.sh.txt (text/plain)
- shrink_CompactAttribute.patch (application/x-patch) patch
- bitfields_gcc.png (image/png)
- bitfields_clang.png (image/png)
On Wed, 5 Mar 2025 at 08:48, Jeff Davis <pgsql@j-davis.com> wrote: > I happened to run into the code and was surprised to see a strongly- > worded comment about the size of CompactAttribute, but then also see > independent booleans rather than flags or bitfields. > > Did the discussion end here, or was there some kind of conclusion? Is > it worth adding a comment about why we use independent booleans, even > if we don't have a complete answer? I must have either forgotten to try that, or I tried it and wrote it off and forgot to document it. Anyway, I've now benchmarked using bitfields on the same 3 machines that I used last time. There are certainly some cases where it's faster with the bitfields, but it's mainly slower. I've attached the results. The 3990x with clang looks good, but the rest are mostly slower. David
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