Re: Make tuple deformation faster

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: David Rowley <dgrowleyml@gmail.com>, Andres Freund <andres@anarazel.de>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-04T19:48:54Z
Lists: pgsql-hackers
On Thu, 2024-10-10 at 02:59 +1300, David Rowley wrote:
> > A few weeks ago David and I discussed this patch. We were curious
> > *why* the
> > flags approach was slower.

...

> > Could it make sense to use bitfields instead of flag values, to
> > reduce the
> > impact?
> 
> Yeah. That's a good idea.

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?

Regards,
	Jeff Davis




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix possible Assert failure in verify_compact_attribute()

  2. Speedup tuple deformation with additional function inlining

  3. Fix race condition in TupleDescCompactAttr assert code

  4. Optimize alignment calculations in tuple form/deform

  5. Remove pg_attribute.attcacheoff column

  6. Introduce CompactAttribute array in TupleDesc, take 2

  7. Introduce CompactAttribute array in TupleDesc

  8. Use TupleDescAttr macro consistently