Mar - Apr 2026

7 commits
Fix nocachegetattr() so it again supports deforming cstrings
2 Apr 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 100% surewritten from the discussion, no matching patch3 of 3 reviewers saw the final version

Removes both cstring-excluding pg_assume() blocks from nocachegetattr() in src/backend/access/common/heaptuple.c, following the report and diagnosis in #56, #58, and #59. No attachment contains this fix; David confirms pushing it in #60.

  • Alexander Lakhinsaw the final versionLLM analysis, 100% sureReported the JSON_ARRAY assertion failure with a minimal reproducer in #56, prompting this unattached fix.
  • Junwang Zhaosaw the final versionLLM analysis, 99% sureTraced UNKNOWNOID tuple attributes to nocachegetattr() and proposed removing pg_assume() in #58, matching the committed remedy.
  • jian hesaw the final versionLLM analysis, 98% sureProvided a row_to_json reproducer and challenged the assumption that heap tuples cannot contain cstrings in #59.
Fix new tuple deforming code so it can support cstrings again
20 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 100% surewritten from the discussion, no matching patch1 of 1 reviewer saw the final version

Adds a constant support_cstring parameter to slot_deform_heap_tuple() and enables it for minimal tuples, implementing David's proposed remedy in #54 for Tender Wang's report #53. The fix was announced in #55 without an attached patch.

  • Tender Wangsaw the final versionLLM analysis, 100% sureReported a SQLSmith crash with a reproducer and a backtrace showing attlen == -2 in minimal-tuple deformation in #53.
Reduce size of CompactAttribute struct to 8 bytes
17 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 99% surepart of a posted patchsetlight changesfrom patchset #472 of 2 reviewers saw the final version

Lands the CompactAttribute-size component of #47, preserving its bitfields, int16 offset limit, and direct compact_attrs access. The only substantive textual difference in that component is an explicit int16 cast on the checked offset assignment.

  • Andres Freundsaw the final versiontrailerExplained the address-calculation advantage of eight-byte CompactAttribute elements in #28 and reviewed generated addressing code in #35, with only light changes to this component afterward.
  • Álvaro Herrerasaw the final versiontrailerInspected the structure with pahole and discussed further bit packing in #33, then accepted the eight-byte addressing rationale in #38.
Fix thinko in nocachegetattr() and nocache_index_getattr()
16 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 92% suremodified before commitmoderate changesfrom patchset #510 of 1 reviewer saw the final version

Implements the same start-before-first-NULL correction as #51, but replaces its Max(0, firstNullAttr - 1) expression with a firstNullAttr > 0 guard and expands both comments. The commit credits David, who had already diagnosed the problem and was verifying his own fix in #50.

  • Tender Wangsaw an earlier versionLLM analysis, 99% sureReported and bisected the crash in the landed version of #47 in #49, before the startAttr logic was corrected.
Optimize tuple deformation
15 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 100% surepart of a posted patchsetmoderate changesfrom patchset #470 of 7 reviewers saw the final version

Lands the main deformation component of #47, omitting its deform_bench adjustment. Committer edits correct isnull allocation rounding, mask transient slot flags, pass NOT NULL flags during scan-slot creation, and revise comments in execTuples.c and related headers.

  • Chao Lisaw an earlier versiontrailerReviewed initialization and bitmap bounds in #4, #6, and #7, and benchmarked #5 in #11, before the substantial deformation rewrite.
  • Andres Freundsaw an earlier versiontrailerDrove the split, benchmark design, SWAR expansion, guaranteed-attribute optimization, and compiler improvements in #8, #12, #17, #22, and #36, before later slot-initialization changes.
  • John Naylorsaw an earlier versiontrailerReviewed bit-scan handling in #18 and #20 and verified that the big-endian failure was fixed in #32, before subsequent executor changes.
  • Amit Langotesaw an earlier versiontrailerIdentified duplicated offset-limit and assignment code in TupleDescFinalize() in #26, which David fixed before further deformation revisions.
  • Zsolt Parragisaw an earlier versiontrailerFound the big-endian bitmap issue and reviewed bounds, validation ordering, and alignment in #29 and #34, before those fixes and later slot changes.
  • Álvaro Herrerasaw an earlier versiontrailerRequested explanations for rounded isnull allocations in #33, before allocation and slot-initialization logic received further changes.
  • Junwang Zhaosaw an earlier versiontrailerProposed simplifying cached-prefix bounds and discussed caching the first variable-width attribute in #46, before the final revision and moderate commit-time edits.
Add all required calls to TupleDescFinalize()
15 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #477 of 7 reviewers saw the final version

Lands only the TupleDescFinalize() prerequisite from #47; its 39-file diff has the same stable patch ID as that component. The empty macro and call sites were already separated in #9 and remained unchanged through the later series.

  • Chao Lisaw the final versiontrailerReviewed the consequences of missing TupleDescFinalize() calls in #4 and tested the revised series in #11, with the prerequisite call sites subsequently preserved.
  • Andres Freundsaw the final versiontrailerRequested separating finalization call sites from their implementation in #8 and continued reviewing the series while this prerequisite remained unchanged.
  • John Naylorsaw the final versiontrailerReviewed bit scanning and tested the broader series in #18 and #32, which already contained the unchanged finalization prerequisite.
  • Amit Langotesaw the final versiontrailerReviewed TupleDescFinalize() implementation in #26 within a series whose separate prerequisite call-site patch was already identical to the landed version.
  • Zsolt Parragisaw the final versiontrailerReviewed the series in #29 and #34, focusing on deformation helpers while the separate finalization prerequisite remained unchanged.
  • Álvaro Herrerasaw the final versiontrailerInspected the applied series in #33, focusing on structure layout and allocations while its finalization prerequisite already matched the landed patch.
  • Junwang Zhaosaw the final versiontrailerReviewed TupleDescFinalize() and deformation bounds in #46 within a series containing the unchanged prerequisite patch.
Allow sibling call optimization in slot_getsomeattrs_int()
14 Mar 2026David Rowleymaster19beta1REL_19_STABLE19beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #470 of 2 reviewers saw the final version

Lands only the sibling-call component of #47, with an identical stable patch ID. It moves missing-attribute handling into getsomeattrs implementations and makes slot_getsomeattrs() dispatch directly.

  • Andres Freundsaw an earlier versiontrailerBenchmarked and recommended the sibling-call change in #28 and examined call overhead in #35, before validation ordering was corrected.
  • Zsolt Parragisaw an earlier versiontrailerFound that slot_getmissingattrs() validated attribute bounds after accessing arrays in #34, prompting the subsequent logic correction.

Credits across 7 commits

Author
David Rowley7
Reviewer
Andres Freund4
Alvaro Herrera3
Zsolt Parragi3
Amit Langote2
Chao Li2
John Naylor2
Junwang Zhao2
Reported by
Tender Wang2
Alexander Lakhin1
Committer
David Rowley7