Re: More speedups for tuple deformation

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, John Naylor <johncnaylorls(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: More speedups for tuple deformation
Date: 2026-03-19 12:56:38
Message-ID: CAApHDvo-5T5Wn1nxUhOsjtYvAbmUPaFpxyLePtyG+6O5hxOb4w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 20 Mar 2026, 01:39 Tender Wang, <tndrwang(at)gmail(dot)com> wrote:

> Hi David,
>
> David Rowley <dgrowleyml(at)gmail(dot)com> 于2026年3月17日周二 05:15写道:
> >
> > On Mon, 16 Mar 2026 at 22:17, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> > >
> > > On Mon, 16 Mar 2026 at 20:01, Tender Wang <tndrwang(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message zengman 2026-03-19 13:17:07 [PATCH] rewriteGraphTable: Fix missing RTEs in FROM clause by setting inFromCl=true
Previous Message Tender Wang 2026-03-19 12:39:26 Re: More speedups for tuple deformation