Re: More speedups for tuple deformation - Mailing list pgsql-hackers

From David Rowley
Subject Re: More speedups for tuple deformation
Date
Msg-id CAApHDvo-5T5Wn1nxUhOsjtYvAbmUPaFpxyLePtyG+6O5hxOb4w@mail.gmail.com
Whole thread
In response to Re: More speedups for tuple deformation  (Tender Wang <tndrwang@gmail.com>)
Responses Re: More speedups for tuple deformation
List pgsql-hackers
On Fri, 20 Mar 2026, 01:39 Tender Wang, <tndrwang@gmail.com> wrote:
Hi David,

David Rowley <dgrowleyml@gmail.com> 于2026年3月17日周二 05:15写道:
>
> On Mon, 16 Mar 2026 at 22:17, David Rowley <dgrowleyml@gmail.com> wrote:
> >
> > On Mon, 16 Mar 2026 at 20:01, Tender Wang <tndrwang@gmail.com> wrote:
postgres=# update public.region set
          r_comment = public.region.r_comment
        returning
          5 as c0,
          pg_catalog.bittypmodout(
            cast(public.region.r_regionkey as int4)) as c1;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

(gdb) bt

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.

David


pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: More speedups for tuple deformation
Next
From: "zengman"
Date:
Subject: [PATCH] rewriteGraphTable: Fix missing RTEs in FROM clause by setting inFromCl=true