=== Applying patches on top of PostgreSQL commit ID 12ca57bf346f1be0986f360d147bbe1a46d682db === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri May 8 01:23:24 UTC 2026 On branch cf/6352 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Fix-startAttr-computation-for-nocache-attribute-fetc.patch === Applying: Fix startAttr computation for nocache attribute fetch Using index info to reconstruct a base tree... M src/backend/access/common/heaptuple.c M src/backend/access/common/indextuple.c Falling back to patching base and 3-way merge... Auto-merging src/backend/access/common/indextuple.c CONFLICT (content): Merge conflict in src/backend/access/common/indextuple.c Auto-merging src/backend/access/common/heaptuple.c CONFLICT (content): Merge conflict in src/backend/access/common/heaptuple.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Fix startAttr computation for nocache attribute fetch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./0001-Fix-startAttr-computation-for-nocache-attribute-fetc.patch === patching file src/backend/access/common/heaptuple.c Hunk #1 FAILED at 541. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/access/common/heaptuple.c.rej patching file src/backend/access/common/indextuple.c Hunk #1 FAILED at 267. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/access/common/indextuple.c.rej Removing src/backend/access/common/heaptuple.c.rej Removing src/backend/access/common/indextuple.c.rej === using 'git apply' to apply patch ./0001-Fix-startAttr-computation-for-nocache-attribute-fetc.patch === Applied patch to 'src/backend/access/common/heaptuple.c' with conflicts. Applied patch to 'src/backend/access/common/indextuple.c' with conflicts. U src/backend/access/common/heaptuple.c U src/backend/access/common/indextuple.c diff --cc src/backend/access/common/heaptuple.c index f30346469ed,31f64b0a31a..00000000000 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@@ -535,14 -535,13 +535,18 @@@ nocachegetattr(HeapTuple tup else firstNullAttr = attnum; - if (tupleDesc->firstNonCachedOffsetAttr > 0) + if (tupleDesc->firstNonCachedOffsetAttr > 0 && firstNullAttr > 0) { /* - * Start at the highest attcacheoff attribute with no NULLs in prior - * attributes. + * Try to start with the highest attribute with an attcacheoff that's + * prior to the one we're looking for, or with the attribute prior to + * the first NULL attribute, if there is one. */ ++<<<<<<< ours + startAttr = Min(tupleDesc->firstNonCachedOffsetAttr - 1, firstNullAttr - 1); ++======= + startAttr = Min(tupleDesc->firstNonCachedOffsetAttr - 1, Max(0, firstNullAttr - 1)); ++>>>>>>> theirs off = TupleDescCompactAttr(tupleDesc, startAttr)->attcacheoff; } else diff --cc src/backend/access/common/indextuple.c index 60bba0a2145,7d0cf9b3ba7..00000000000 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@@ -261,14 -261,13 +261,18 @@@ nocache_index_getattr(IndexTuple tup else firstNullAttr = attnum; - if (tupleDesc->firstNonCachedOffsetAttr > 0) + if (tupleDesc->firstNonCachedOffsetAttr > 0 && firstNullAttr > 0) { /* - * Start at the highest attcacheoff attribute with no NULLs in prior - * attributes. + * Try to start with the highest attribute with an attcacheoff that's + * prior to the one we're looking for, or with the attribute prior to + * the first NULL attribute, if there is one. */ ++<<<<<<< ours + startAttr = Min(tupleDesc->firstNonCachedOffsetAttr - 1, firstNullAttr - 1); ++======= + startAttr = Min(tupleDesc->firstNonCachedOffsetAttr - 1, Max(0, firstNullAttr - 1)); ++>>>>>>> theirs off = TupleDescCompactAttr(tupleDesc, startAttr)->attcacheoff; } else