Re: Dead code with short varlenas in toast_save_datum() - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Dead code with short varlenas in toast_save_datum()
Date
Msg-id aKF2DMi2vjQC5dOp@paquier.xyz
Whole thread Raw
In response to Re: Dead code with short varlenas in toast_save_datum()  (Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>)
List pgsql-hackers
On Sat, Aug 16, 2025 at 02:34:02AM -0700, Nikhil Kumar Veldanda wrote:
> Thanks for the guidance. I’ve updated the isolation test to use a CTAS
> capturing (id, chunk_id) pre-CLUSTER and added a post-CLUSTER join to
> verify the chunk IDs match. I also reduced the number of tuples to 1.
>
> Please find the attached patch for your review. Thanks

Cool, thanks for the new patch.  The structure looks OK.  There were
two things that itched me a bit:
- Instead of reporting the number of tuples where the chunk IDs do not
match across the rewrites, I have rewritten the query to report the
serial IDs, instead.
- Making sure that the CTAS holds some data, matching with the number
of tuples inserted.  A count(*) was enough for that.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Remove Instruction Synchronization Barrier in spin_delay() for ARM64 architecture
Next
From: Naga Appani
Date:
Subject: Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring