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

From jian he
Subject Re: More speedups for tuple deformation
Date
Msg-id CACJufxHzTY2ZWPy7RNCY2S-Z2A+8j7CqhKbdKrzFUhykQiTfVA@mail.gmail.com
Whole thread Raw
In response to Re: More speedups for tuple deformation  (Junwang Zhao <zhjwpku@gmail.com>)
List pgsql-hackers
On Wed, Apr 1, 2026 at 1:13 PM Junwang Zhao <zhjwpku@gmail.com> wrote:
>
> The parser transforms '' (or any cstring) into Const with UNKNOWNOID.
> When building the tuple descriptor in ExecTypeFromExprList,
> TupleDescInitEntry uses UNKNOWNOID to populate the attribute entry,
> thus the failure in nocachegetattr.
>
> Therefore, the assertion should be addressed by removing the pg_assume,
> since this case can occur.
>
> Just trying to learn through analysis, might be incorrect. Let's wait for
> David's fix.
>
HI.

You can also trigger it via:

SELECT row_to_json(('', ''));

In transformRowExpr, we can coerce these UNKNOWNOID Const to TEXTOID Const.
But I guess it's harder to guarantee that comment "cstrings don't
exist in heap tuples." in nocachegetattr to be true.


--
jian
https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: meson vs. llvm bitcode files
Next
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]