=== Applying patches on top of PostgreSQL commit ID 4f941d432b42eccd99ba0d22e3a59c073ac2406a === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Tue Dec 2 11:02:26 UTC 2025 On branch cf/6271 nothing to commit, working tree clean === using 'git am' to apply patch ./v1-0001-Pass-the-number-of-ScanKeys-to-scan_rescan.patch === Applying: Pass the number of ScanKeys to scan_rescan() Using index info to reconstruct a base tree... M src/backend/access/brin/brin.c M src/backend/access/gin/gininsert.c M src/backend/access/heap/heapam.c M src/backend/access/nbtree/nbtsort.c M src/backend/access/table/tableam.c M src/backend/executor/execReplication.c M src/backend/executor/nodeTidscan.c M src/include/access/heapam.h M src/include/access/tableam.h Falling back to patching base and 3-way merge... Auto-merging src/include/access/tableam.h CONFLICT (content): Merge conflict in src/include/access/tableam.h Auto-merging src/include/access/heapam.h Auto-merging src/backend/executor/nodeTidscan.c Auto-merging src/backend/executor/execReplication.c Auto-merging src/backend/access/table/tableam.c Auto-merging src/backend/access/nbtree/nbtsort.c Auto-merging src/backend/access/heap/heapam.c Auto-merging src/backend/access/gin/gininsert.c Auto-merging src/backend/access/brin/brin.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 Pass the number of ScanKeys to scan_rescan() 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 src/backend/access/brin/brin.c M src/backend/access/gin/gininsert.c M src/backend/access/heap/heapam.c M src/backend/access/nbtree/nbtsort.c M src/backend/access/table/tableam.c M src/backend/executor/execReplication.c M src/backend/executor/nodeBitmapHeapscan.c M src/backend/executor/nodeSamplescan.c M src/backend/executor/nodeSeqscan.c M src/backend/executor/nodeTidscan.c M src/include/access/heapam.h M src/include/access/tableam.h === using patch(1) to apply patch ./v1-0001-Pass-the-number-of-ScanKeys-to-scan_rescan.patch === patching file src/backend/access/brin/brin.c Hunk #1 succeeded at 2842 (offset 14 lines). patching file src/backend/access/gin/gininsert.c Hunk #1 succeeded at 2058 (offset 28 lines). patching file src/backend/access/heap/heapam.c Hunk #1 succeeded at 1266 (offset 15 lines). patching file src/backend/access/nbtree/nbtsort.c Hunk #1 succeeded at 1925 (offset -2 lines). patching file src/backend/access/table/tableam.c patching file src/backend/executor/execReplication.c patching file src/backend/executor/nodeBitmapHeapscan.c patching file src/backend/executor/nodeSamplescan.c patching file src/backend/executor/nodeSeqscan.c patching file src/backend/executor/nodeTidscan.c Hunk #1 succeeded at 465 (offset 11 lines). patching file src/include/access/heapam.h Hunk #1 succeeded at 331 (offset 38 lines). patching file src/include/access/tableam.h Hunk #1 FAILED at 334. Hunk #2 FAILED at 985. Hunk #3 FAILED at 1000. Hunk #4 succeeded at 1073 (offset 5 lines). Hunk #5 succeeded at 1129 with fuzz 1 (offset 5 lines). 3 out of 5 hunks FAILED -- saving rejects to file src/include/access/tableam.h.rej Unstaged changes after reset: M src/backend/access/brin/brin.c M src/backend/access/gin/gininsert.c M src/backend/access/heap/heapam.c M src/backend/access/nbtree/nbtsort.c M src/backend/access/table/tableam.c M src/backend/executor/execReplication.c M src/backend/executor/nodeBitmapHeapscan.c M src/backend/executor/nodeSamplescan.c M src/backend/executor/nodeSeqscan.c M src/backend/executor/nodeTidscan.c M src/include/access/heapam.h M src/include/access/tableam.h Removing src/include/access/tableam.h.rej === using 'git apply' to apply patch ./v1-0001-Pass-the-number-of-ScanKeys-to-scan_rescan.patch === Applied patch to 'src/backend/access/brin/brin.c' cleanly. Applied patch to 'src/backend/access/gin/gininsert.c' cleanly. Applied patch to 'src/backend/access/heap/heapam.c' cleanly. Applied patch to 'src/backend/access/nbtree/nbtsort.c' cleanly. Applied patch to 'src/backend/access/table/tableam.c' cleanly. Applied patch to 'src/backend/executor/execReplication.c' cleanly. Applied patch to 'src/backend/executor/nodeBitmapHeapscan.c' cleanly. Applied patch to 'src/backend/executor/nodeSamplescan.c' cleanly. Applied patch to 'src/backend/executor/nodeSeqscan.c' cleanly. Applied patch to 'src/backend/executor/nodeTidscan.c' cleanly. Applied patch to 'src/include/access/heapam.h' cleanly. Applied patch to 'src/include/access/tableam.h' with conflicts. U src/include/access/tableam.h diff --cc src/include/access/tableam.h index 2fa790b6bf5,6fa0fa55a33..00000000000 --- a/src/include/access/tableam.h +++ b/src/include/access/tableam.h @@@ -340,9 -334,10 +340,16 @@@ typedef struct TableAmRoutin * Restart relation scan. If set_params is set to true, allow_{strat, * sync, pagemode} (see scan_begin) changes should be taken into account. */ ++<<<<<<< ours + void (*scan_rescan) (TableScanDesc scan, ScanKeyData *key, + bool set_params, bool allow_strat, + bool allow_sync, bool allow_pagemode); ++======= + void (*scan_rescan) (TableScanDesc scan, int nkeys, + struct ScanKeyData *key, bool set_params, + bool allow_strat, bool allow_sync, + bool allow_pagemode); ++>>>>>>> theirs /* * Return next tuple from `scan`, store in slot. @@@ -991,9 -986,10 +998,14 @@@ table_endscan(TableScanDesc scan * Restart a relation scan. */ static inline void ++<<<<<<< ours +table_rescan(TableScanDesc scan, ScanKeyData *key) ++======= + table_rescan(TableScanDesc scan, int nkeys, struct ScanKeyData *key) ++>>>>>>> theirs { - scan->rs_rd->rd_tableam->scan_rescan(scan, key, false, false, false, false); + scan->rs_rd->rd_tableam->scan_rescan(scan, nkeys, key, false, false, false, + false); } /* @@@ -1005,10 -1001,10 +1017,14 @@@ * previously selected startblock will be kept. */ static inline void ++<<<<<<< ours +table_rescan_set_params(TableScanDesc scan, ScanKeyData *key, ++======= + table_rescan_set_params(TableScanDesc scan, int nkeys, struct ScanKeyData *key, ++>>>>>>> theirs bool allow_strat, bool allow_sync, bool allow_pagemode) { - scan->rs_rd->rd_tableam->scan_rescan(scan, key, true, + scan->rs_rd->rd_tableam->scan_rescan(scan, nkeys, key, true, allow_strat, allow_sync, allow_pagemode); } @@@ -1128,18 -1125,10 +1145,20 @@@ extern void table_parallelscan_initiali * Caller must hold a suitable lock on the relation. */ extern TableScanDesc table_beginscan_parallel(Relation relation, - ParallelTableScanDesc pscan); + ParallelTableScanDesc pscan, + int nkeys, + struct ScanKeyData *key); +/* + * Begin a parallel tid range scan. `pscan` needs to have been initialized + * with table_parallelscan_initialize(), for the same relation. The + * initialization does not need to have happened in this backend. + * + * Caller must hold a suitable lock on the relation. + */ +extern TableScanDesc table_beginscan_parallel_tidrange(Relation relation, + ParallelTableScanDesc pscan); + /* * Restart a parallel scan. Call this in the leader process. Caller is * responsible for making sure that all workers have finished the scan