=== Applying patches on top of PostgreSQL commit ID a8bb1a77795bab6e1304efa5c5dabee797b6887e === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Sep 19 17:21:34 UTC 2026 On branch cf/7267 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-Refactor-detoasting-pipeline-to-unify-full-and-sl.patch === Applying: Refactor detoasting pipeline to unify full and slice fetches Using index info to reconstruct a base tree... M src/backend/access/common/detoast.c Falling back to patching base and 3-way merge... Auto-merging src/backend/access/common/detoast.c CONFLICT (content): Merge conflict in src/backend/access/common/detoast.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 Refactor detoasting pipeline to unify full and slice fetches 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 ./v2-0001-Refactor-detoasting-pipeline-to-unify-full-and-sl.patch === patching file src/backend/access/common/detoast.c Hunk #2 FAILED at 337. 1 out of 2 hunks FAILED -- saving rejects to file src/backend/access/common/detoast.c.rej Unstaged changes after reset: M src/backend/access/common/detoast.c Removing src/backend/access/common/detoast.c.rej === using 'git apply' to apply patch ./v2-0001-Refactor-detoasting-pipeline-to-unify-full-and-sl.patch === Applied patch to 'src/backend/access/common/detoast.c' with conflicts. U src/backend/access/common/detoast.c diff --cc src/backend/access/common/detoast.c index 06992de1ede,f85bed1cf99..00000000000 --- a/src/backend/access/common/detoast.c +++ b/src/backend/access/common/detoast.c @@@ -337,56 -337,6 +342,59 @@@ detoast_attr_slice(varlena *attr return result; } ++<<<<<<< ours +/* ---------- + * toast_fetch_datum - + * + * Reconstruct an in memory Datum from the chunks saved + * in the toast relation + * ---------- + */ +static varlena * +toast_fetch_datum(varlena *attr) +{ + Relation toastrel; + varlena *result; + toast_external_data toast_ext_data; + int32 attrsize; + Oid toastrelid; + Oid8 valueid; + + if (!VARATT_IS_EXTERNAL_ONDISK(attr)) + elog(ERROR, "toast_fetch_datum shouldn't be called for non-ondisk datums"); + + toast_external_info_get(attr, &toast_ext_data); + attrsize = VARATT_EXTINFO_GET_EXTSIZE(toast_ext_data.extinfo); + toastrelid = toast_ext_data.toastrelid; + valueid = toast_ext_data.valueid; + + result = (varlena *) palloc(attrsize + VARHDRSZ); + + if (VARATT_EXTINFO_IS_COMPRESSED(toast_ext_data.extinfo, toast_ext_data.rawsize)) + SET_VARSIZE_COMPRESSED(result, attrsize + VARHDRSZ); + else + SET_VARSIZE(result, attrsize + VARHDRSZ); + + if (attrsize == 0) + return result; /* Probably shouldn't happen, but just in + * case. */ + + /* + * Open the toast relation and its indexes + */ + toastrel = table_open(toastrelid, AccessShareLock); + + /* Fetch all chunks */ + table_relation_fetch_toast_slice(toastrel, valueid, + attrsize, 0, attrsize, result); + + /* Close toast table */ + table_close(toastrel, AccessShareLock); + + return result; +} ++======= ++>>>>>>> theirs /* ---------- * toast_fetch_datum_slice -