=== Applying patches on top of PostgreSQL commit ID 69c57466a7521ee146cfdde766713181d45a2d36 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Mar 22 23:36:26 UTC 2026 On branch cf/6346 nothing to commit, working tree clean === using 'git am' to apply patch ./v6-0002-Streamify-heap-bloat-estimation-scan.-Introduce-a.patch === Applying: Streamify heap bloat estimation scan. Introduce a read-stream callback to skip all-visible pages via VM/FSM lookup and stream-read the rest, reducing page reads and improving pgstattuple_approx execution time on large relations. Using index info to reconstruct a base tree... M contrib/pgstattuple/pgstatapprox.c M src/tools/pgindent/typedefs.list Falling back to patching base and 3-way merge... Auto-merging src/tools/pgindent/typedefs.list Auto-merging contrib/pgstattuple/pgstatapprox.c CONFLICT (content): Merge conflict in contrib/pgstattuple/pgstatapprox.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 Streamify heap bloat estimation scan. Introduce a read-stream callback to skip all-visible pages via VM/FSM lookup and stream-read the rest, reducing page reads and improving pgstattuple_approx execution time on large relations. 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/pgstatapprox.c === using patch(1) to apply patch ./v6-0002-Streamify-heap-bloat-estimation-scan.-Introduce-a.patch === patching file contrib/pgstattuple/pgstatapprox.c Hunk #1 FAILED at 23. Hunk #2 succeeded at 46 with fuzz 2 (offset 1 line). Hunk #3 FAILED at 113. Hunk #4 succeeded at 289 with fuzz 2 (offset 65 lines). Hunk #5 FAILED at 237. Hunk #6 FAILED at 248. 4 out of 6 hunks FAILED -- saving rejects to file contrib/pgstattuple/pgstatapprox.c.rej patching file src/tools/pgindent/typedefs.list Hunk #1 FAILED at 2917. 1 out of 1 hunk FAILED -- saving rejects to file src/tools/pgindent/typedefs.list.rej Unstaged changes after reset: M contrib/pgstattuple/pgstatapprox.c Removing contrib/pgstattuple/pgstatapprox.c.rej Removing src/tools/pgindent/typedefs.list.rej === using 'git apply' to apply patch ./v6-0002-Streamify-heap-bloat-estimation-scan.-Introduce-a.patch === Applied patch to 'contrib/pgstattuple/pgstatapprox.c' with conflicts. Applied patch to 'src/tools/pgindent/typedefs.list' cleanly. U contrib/pgstattuple/pgstatapprox.c diff --cc contrib/pgstattuple/pgstatapprox.c index 21e0b50fb4b,68ae7720b31..00000000000 --- a/contrib/pgstattuple/pgstatapprox.c +++ b/contrib/pgstattuple/pgstatapprox.c @@@ -62,18 -62,17 +62,29 @@@ typedef struct StatApproxReadStreamPriv /* * Read stream callback for statapprox_heap. * ++<<<<<<< ours + * This callback checks the visibility map for each block. If the block is + * all-visible, we can get the free space from the FSM without reading the + * actual page, and skip to the next block. Only the blocks that are not + * all-visible are returned for actual reading after being locked. ++======= + * This callback checks the visibility map for each block. If the block is + * all-visible, we can get the free space from the FSM without reading the + * actual page, and skip to the next block. Only blocks that are not + * all-visible are returned for actual reading. ++>>>>>>> theirs */ static BlockNumber statapprox_heap_read_stream_next(ReadStream *stream, void *callback_private_data, void *per_buffer_data) { ++<<<<<<< ours + StatApproxReadStreamPrivate *p = + (StatApproxReadStreamPrivate *) callback_private_data; ++======= + StatApproxReadStreamPrivate *p = callback_private_data; ++>>>>>>> theirs while (p->current_blocknum < p->nblocks) {