=== Applying patches on top of PostgreSQL commit ID 6dfce8420e99d8cf41ffb7da698caee57fd73eb7 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Dec 6 02:10:22 UTC 2025 On branch cf/5715 nothing to commit, working tree clean === using 'git am' to apply patch ./v10-0001-brin-refactoring.patch === Applying: brin refactoring === using 'git am' to apply patch ./v10-0002-amcheck-brin_index_check-index-structure-check.patch === Applying: amcheck: brin_index_check() - index structure check === using 'git am' to apply patch ./v10-0003-amcheck-common_verify-snapshot-indcheckxmin-chec.patch === Applying: amcheck: common_verify - snapshot indcheckxmin check Using index info to reconstruct a base tree... M contrib/amcheck/verify_common.h M contrib/amcheck/verify_nbtree.c Falling back to patching base and 3-way merge... Auto-merging contrib/amcheck/verify_nbtree.c CONFLICT (content): Merge conflict in contrib/amcheck/verify_nbtree.c Auto-merging contrib/amcheck/verify_common.h error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 amcheck: common_verify - snapshot indcheckxmin check 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". Unstaged changes after reset: M contrib/amcheck/verify_common.c M contrib/amcheck/verify_common.h M contrib/amcheck/verify_nbtree.c === using patch(1) to apply patch ./v10-0003-amcheck-common_verify-snapshot-indcheckxmin-chec.patch === patching file contrib/amcheck/verify_common.c patching file contrib/amcheck/verify_common.h patching file contrib/amcheck/verify_nbtree.c Hunk #1 FAILED at 442. 1 out of 1 hunk FAILED -- saving rejects to file contrib/amcheck/verify_nbtree.c.rej Unstaged changes after reset: M contrib/amcheck/verify_common.c M contrib/amcheck/verify_common.h Removing contrib/amcheck/verify_nbtree.c.rej === using 'git apply' to apply patch ./v10-0003-amcheck-common_verify-snapshot-indcheckxmin-chec.patch === Applied patch to 'contrib/amcheck/verify_common.c' cleanly. Applied patch to 'contrib/amcheck/verify_common.h' cleanly. Applied patch to 'contrib/amcheck/verify_nbtree.c' with conflicts. U contrib/amcheck/verify_nbtree.c diff --cc contrib/amcheck/verify_nbtree.c index f91392a3a49,6231d83ade9..00000000000 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@@ -438,27 -439,11 +438,35 @@@ bt_check_every_level(Relation rel, Rela * certain that index fingerprinting should have reached all tuples * returned by table_index_build_scan(). */ ++<<<<<<< ours + state->snapshot = RegisterSnapshot(GetTransactionSnapshot()); + + /* + * GetTransactionSnapshot() always acquires a new MVCC snapshot in + * READ COMMITTED mode. A new snapshot is guaranteed to have all the + * entries it requires in the index. + * + * We must defend against the possibility that an old xact snapshot + * was returned at higher isolation levels when that snapshot is not + * safe for index scans of the target index. This is possible when + * the snapshot sees tuples that are before the index's indcheckxmin + * horizon. Throwing an error here should be very rare. It doesn't + * seem worth using a secondary snapshot to avoid this. + */ + if (IsolationUsesXactSnapshot() && rel->rd_index->indcheckxmin && + !TransactionIdPrecedes(HeapTupleHeaderGetXmin(rel->rd_indextuple->t_data), + state->snapshot->xmin)) + ereport(ERROR, + errcode(ERRCODE_T_R_SERIALIZATION_FAILURE), + errmsg("index \"%s\" cannot be verified using transaction snapshot", + RelationGetRelationName(rel))); ++======= + if (!state->readonly) + { + snapshot = RegisterSnapshot(GetTransactionSnapshot()); + check_indcheckxmin(state->rel, snapshot); + } ++>>>>>>> theirs } /*