public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Tender Wang <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: John Naylor <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Subject: Re: More speedups for tuple deformation
Date: Fri, 20 Mar 2026 14:18:12 +1300
Message-ID: <CAApHDvpdAXFdKeDaMDf1ssvSc-38-POg8QRBTKHEg7dhGRXP-g@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvo-5T5Wn1nxUhOsjtYvAbmUPaFpxyLePtyG+6O5hxOb4w@mail.gmail.com>
References: <CAApHDvpbntG7V3_EsZ+w-V=jU-y8rFmv9RB1EDJm4sxKno-4UA@mail.gmail.com>
	<e7sto7tk5dk5hfyvoocaddnxcngemcmfvbuh23l32w5cssaizy@znuphjqug7qe>
	<CAApHDvpuEbhvH1ViCZRz5vks+_bGbEnPoEdZYAZXK76_isb_+Q@mail.gmail.com>
	<v6z545yozjtywghn5glujemu72z4i4ynadsc2xks4ejotdg7yl@4rry7ixwr4us>
	<CANWCAZabO1oj+khF+YNVpmkTQwRRyNJesbsBhRFL5emZJh3tow@mail.gmail.com>
	<lzgoxzbh2gel5w362revuwaecrsbjr44kjdzrewuejugcodkeq@ixymojwnylsy>
	<CAApHDvodSVBj3ypOYbYUCJX+NWL=VZs63RNBQ_FxB_F+6QXF-A@mail.gmail.com>
	<rbxc2qqhsvzxpukgd36caoa4ydgn5r22fxktxanrkn6nobg7j6@27b4vogohgu2>
	<CAApHDvpWQn8sXDYpSNNpieJW-UTG4Nf4TVjT8ew64L073hz-Fw@mail.gmail.com>
	<mq6ddpgctt42srolsvo5kph2s6shfg62meb7i5fbg6n3s73zju@2n7gviiyga3h>
	<uhqul2ryci4tyg5ylddjrmf4kybzwb7m5z7rmurhhjp37vrn5f@zgxil7egr62n>
	<CAApHDvq21qQigiM6z2YgadFusQC_pfEYP8D=oQCrwJ_kKzcqDg@mail.gmail.com>
	<CAApHDvpdB1t7LCgH8=KOKC6VBb2rsEbaas0FiXo5awsRgCsDxQ@mail.gmail.com>
	<CAEG8a3KeKcZxJsH9nL+D1JzC4Ekx51ps7-1ZGWkwdXbPS5jTXw@mail.gmail.com>
	<CAApHDvqp_DGNkz3Rr29hPuSYdai5c_32mWSv2inrW2ufsE+qZQ@mail.gmail.com>
	<CAHewXNnb-s_=VdVUZ9h7dPA0u3hxV8x2aU3obZytnqQZ_MiROA@mail.gmail.com>
	<CAApHDvrFmW+2GhdDKuWRaJmp8MfghmBiEGaeqjOD_Y2RWUFSow@mail.gmail.com>
	<CAApHDvoy9AJ4D2+pJE0ZRhPPCHh-Mm-sZAfookKtf_3V+GeP0g@mail.gmail.com>
	<CAHewXNmSK+gKziAt_WvQoMVWt3_LRVMmRYY9dAbMPMcpPV0QmA@mail.gmail.com>
	<CAApHDvo-5T5Wn1nxUhOsjtYvAbmUPaFpxyLePtyG+6O5hxOb4w@mail.gmail.com>

On Fri, 20 Mar 2026 at 01:56, David Rowley <[email protected]> wrote:
>
> On Fri, 20 Mar 2026, 01:39 Tender Wang, <[email protected]> wrote:
>> 1197 pg_assume(attlen > 0 || attlen == -1);
>> (gdb) p attlen
>> $1 = -2
>
>
> Thanks for the report. I'll look in detail in the morning when I'm at my computer again. I guess i'll need to add an extra parameter (that will be constant folded away during the inlining) to the deformed function to specify if cstrings can exist in the tuple, which seemingly needs to be true when deforming minimal tuples. I'd rather not lose that optimisation with heap tuples.

I've pushed a fix for this.  A more simple recreator was:

with cte as materialized (select relname::cstring as relname from
pg_class) select relname from cte;

David





view thread (31+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: More speedups for tuple deformation
  In-Reply-To: <CAApHDvpdAXFdKeDaMDf1ssvSc-38-POg8QRBTKHEg7dhGRXP-g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox