=== Applying patches on top of PostgreSQL commit ID ae58189a4d523f0156ebe30f4534180555669e88 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Mar 14 07:02:23 UTC 2026 On branch cf/6125 nothing to commit, working tree clean === using 'git am' to apply patch ./v5-0001-Use-streaming-read-API-in-pgstatindex-functions.patch === Applying: Use streaming read API in pgstatindex functions Using index info to reconstruct a base tree... M contrib/pgstattuple/pgstatindex.c Falling back to patching base and 3-way merge... Auto-merging contrib/pgstattuple/pgstatindex.c CONFLICT (content): Merge conflict in contrib/pgstattuple/pgstatindex.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 Use streaming read API in pgstatindex functions 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/pgstattuple/pgstatindex.c === using patch(1) to apply patch ./v5-0001-Use-streaming-read-API-in-pgstatindex-functions.patch === patching file contrib/pgstattuple/pgstatindex.c Hunk #1 FAILED at 37. Hunk #2 FAILED at 217. Hunk #3 FAILED at 273. Hunk #4 FAILED at 285. Hunk #5 FAILED at 322. Hunk #6 FAILED at 596. Hunk #7 FAILED at 636. Hunk #8 FAILED at 644. Hunk #9 succeeded at 742 with fuzz 2 (offset 52 lines). 8 out of 9 hunks FAILED -- saving rejects to file contrib/pgstattuple/pgstatindex.c.rej Unstaged changes after reset: M contrib/pgstattuple/pgstatindex.c Removing contrib/pgstattuple/pgstatindex.c.rej === using 'git apply' to apply patch ./v5-0001-Use-streaming-read-API-in-pgstatindex-functions.patch === Applied patch to 'contrib/pgstattuple/pgstatindex.c' with conflicts. U contrib/pgstattuple/pgstatindex.c diff --cc contrib/pgstattuple/pgstatindex.c index 3a3f2637bd9,e9c06de4e52..00000000000 --- a/contrib/pgstattuple/pgstatindex.c +++ b/contrib/pgstattuple/pgstatindex.c @@@ -220,7 -220,6 +220,10 @@@ pgstatindex_impl(Relation rel, Function BufferAccessStrategy bstrategy = GetAccessStrategy(BAS_BULKREAD); BlockRangeReadStreamPrivate p; ReadStream *stream; ++<<<<<<< ours + BlockNumber startblk; ++======= ++>>>>>>> theirs if (!IS_INDEX(rel) || !IS_BTREE(rel)) ereport(ERROR, @@@ -280,9 -279,8 +283,13 @@@ * Scan all blocks except the metapage (0th page) using streaming reads */ nblocks = RelationGetNumberOfBlocks(rel); + startblk = BTREE_METAPAGE + 1; ++<<<<<<< ours + p.current_blocknum = startblk; ++======= + p.current_blocknum = BTREE_METAPAGE + 1; ++>>>>>>> theirs p.last_exclusive = nblocks; /* @@@ -298,7 -296,7 +305,11 @@@ &p, 0); ++<<<<<<< ours + for (blkno = startblk; blkno < nblocks; blkno++) ++======= + for (blkno = 1; blkno < nblocks; blkno++) ++>>>>>>> theirs { Buffer buffer; Page page; @@@ -623,12 -617,7 +634,15 @@@ pgstathashindex(PG_FUNCTION_ARGS uint64 total_space; BlockRangeReadStreamPrivate p; ReadStream *stream; ++<<<<<<< ours + BlockNumber startblk; ++======= ++>>>>>>> theirs + /* + * This uses relation_open() and not index_open(). The latter allows + * partitioned indexes, and these are forbidden here. + */ rel = relation_open(relid, AccessShareLock); if (!IS_INDEX(rel) || !IS_HASH(rel)) @@@ -669,9 -658,7 +683,13 @@@ bstrategy = GetAccessStrategy(BAS_BULKREAD); /* Scan all blocks except the metapage (0th page) using streaming reads */ ++<<<<<<< ours + startblk = HASH_METAPAGE + 1; + + p.current_blocknum = startblk; ++======= + p.current_blocknum = HASH_METAPAGE + 1; ++>>>>>>> theirs p.last_exclusive = nblocks; /* @@@ -687,7 -674,7 +705,11 @@@ &p, 0); ++<<<<<<< ours + for (blkno = startblk; blkno < nblocks; blkno++) ++======= + for (blkno = 1; blkno < nblocks; blkno++) ++>>>>>>> theirs { Buffer buf; Page page;