=== Applying patches on top of PostgreSQL commit ID f275afc997d77ada991307d22703b08f1dedef13 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Wed Dec 10 01:23:22 UTC 2025 On branch cf/6276 nothing to commit, working tree clean === using 'git am' to apply patch ./v3-0001-Add-hash_make-macros.patch === Applying: Add hash_make macros === using 'git am' to apply patch ./v3-0002-Use-hash_make-macros-throughout-the-codebase.patch === Applying: Use hash_make macros throughout the codebase Using index info to reconstruct a base tree... M src/backend/access/common/heaptuple.c M src/backend/access/gist/gistbuild.c M src/backend/access/gist/gistbuildbuffers.c M src/backend/access/heap/rewriteheap.c M src/backend/access/transam/xlogprefetcher.c M src/backend/access/transam/xlogutils.c M src/backend/catalog/pg_enum.c M src/backend/catalog/storage.c M src/backend/commands/tablecmds.c M src/backend/executor/nodeModifyTable.c M src/backend/optimizer/util/plancat.c M src/backend/optimizer/util/predtest.c M src/backend/optimizer/util/relnode.c M src/backend/partitioning/partdesc.c M src/backend/postmaster/autovacuum.c M src/backend/postmaster/checkpointer.c M src/backend/replication/logical/applyparallelworker.c M src/backend/replication/logical/relation.c M src/backend/replication/logical/reorderbuffer.c M src/backend/replication/pgoutput/pgoutput.c M src/backend/storage/ipc/shmem.c M src/backend/storage/lmgr/lock.c M src/backend/storage/lmgr/predicate.c M src/backend/storage/smgr/smgr.c M src/backend/storage/sync/sync.c M src/backend/tsearch/ts_typanalyze.c M src/backend/utils/activity/wait_event.c M src/backend/utils/adt/array_typanalyze.c M src/backend/utils/adt/json.c M src/backend/utils/adt/jsonfuncs.c M src/backend/utils/adt/mcxtfuncs.c M src/backend/utils/adt/ruleutils.c M src/backend/utils/cache/evtcache.c M src/backend/utils/cache/relcache.c M src/backend/utils/cache/typcache.c M src/backend/utils/misc/guc.c M src/backend/utils/misc/injection_point.c M src/pl/plperl/plperl.c M src/pl/plpgsql/src/pl_exec.c M src/pl/plpython/plpy_procedure.c M src/pl/tcl/pltcl.c M src/timezone/pgtz.c Falling back to patching base and 3-way merge... Auto-merging src/timezone/pgtz.c Auto-merging src/pl/tcl/pltcl.c Auto-merging src/pl/plpython/plpy_procedure.c Auto-merging src/pl/plpgsql/src/pl_exec.c Auto-merging src/pl/plperl/plperl.c Auto-merging src/backend/utils/misc/injection_point.c Auto-merging src/backend/utils/misc/guc.c Auto-merging src/backend/utils/cache/typcache.c Auto-merging src/backend/utils/cache/relcache.c Auto-merging src/backend/utils/cache/evtcache.c Auto-merging src/backend/utils/adt/ruleutils.c Auto-merging src/backend/utils/adt/mcxtfuncs.c Auto-merging src/backend/utils/adt/jsonfuncs.c Auto-merging src/backend/utils/adt/json.c Auto-merging src/backend/utils/adt/array_typanalyze.c Auto-merging src/backend/utils/activity/wait_event.c Auto-merging src/backend/tsearch/ts_typanalyze.c Auto-merging src/backend/storage/sync/sync.c Auto-merging src/backend/storage/smgr/smgr.c Auto-merging src/backend/storage/lmgr/predicate.c Auto-merging src/backend/storage/lmgr/lock.c Auto-merging src/backend/storage/ipc/shmem.c Auto-merging src/backend/replication/pgoutput/pgoutput.c Auto-merging src/backend/replication/logical/reorderbuffer.c Auto-merging src/backend/replication/logical/relation.c Auto-merging src/backend/replication/logical/applyparallelworker.c Auto-merging src/backend/postmaster/checkpointer.c Auto-merging src/backend/postmaster/autovacuum.c Auto-merging src/backend/partitioning/partdesc.c Auto-merging src/backend/optimizer/util/relnode.c Auto-merging src/backend/optimizer/util/predtest.c Auto-merging src/backend/optimizer/util/plancat.c Auto-merging src/backend/executor/nodeModifyTable.c Auto-merging src/backend/commands/tablecmds.c Auto-merging src/backend/catalog/storage.c Auto-merging src/backend/catalog/pg_enum.c Auto-merging src/backend/access/transam/xlogutils.c Auto-merging src/backend/access/transam/xlogprefetcher.c Auto-merging src/backend/access/heap/rewriteheap.c Auto-merging src/backend/access/gist/gistbuildbuffers.c Auto-merging src/backend/access/gist/gistbuild.c Auto-merging src/backend/access/common/heaptuple.c === using 'git am' to apply patch ./v3-0003-Inline-functions-that-have-now-become-trivial.patch === Applying: Inline functions that have now become trivial === using 'git am' to apply patch ./v3-0004-Add-foreach_hash-macro.patch === Applying: Add foreach_hash macro === using 'git am' to apply patch ./v3-0005-Use-foreach_hash-macro-throughout-the-codebase.patch === Applying: Use foreach_hash macro throughout the codebase Using index info to reconstruct a base tree... M src/backend/access/heap/rewriteheap.c M src/backend/access/transam/xlogutils.c M src/backend/catalog/pg_enum.c M src/backend/catalog/storage.c M src/backend/commands/tablecmds.c M src/backend/optimizer/util/predtest.c M src/backend/partitioning/partdesc.c M src/backend/postmaster/autovacuum.c M src/backend/replication/logical/relation.c M src/backend/replication/logical/reorderbuffer.c M src/backend/replication/pgoutput/pgoutput.c M src/backend/storage/ipc/shmem.c M src/backend/storage/lmgr/lock.c M src/backend/storage/lmgr/predicate.c M src/backend/storage/smgr/smgr.c M src/backend/storage/sync/sync.c M src/backend/tsearch/ts_typanalyze.c M src/backend/utils/activity/wait_event.c M src/backend/utils/adt/array_typanalyze.c M src/backend/utils/cache/relcache.c M src/backend/utils/misc/guc.c Falling back to patching base and 3-way merge... Auto-merging src/backend/utils/misc/guc.c Auto-merging src/backend/utils/cache/relcache.c Auto-merging src/backend/utils/adt/array_typanalyze.c CONFLICT (content): Merge conflict in src/backend/utils/adt/array_typanalyze.c Auto-merging src/backend/utils/activity/wait_event.c Auto-merging src/backend/tsearch/ts_typanalyze.c Auto-merging src/backend/storage/sync/sync.c Auto-merging src/backend/storage/smgr/smgr.c Auto-merging src/backend/storage/lmgr/predicate.c Auto-merging src/backend/storage/lmgr/lock.c Auto-merging src/backend/storage/ipc/shmem.c Auto-merging src/backend/replication/pgoutput/pgoutput.c Auto-merging src/backend/replication/logical/reorderbuffer.c Auto-merging src/backend/replication/logical/relation.c Auto-merging src/backend/postmaster/autovacuum.c Auto-merging src/backend/partitioning/partdesc.c Auto-merging src/backend/optimizer/util/predtest.c Auto-merging src/backend/commands/tablecmds.c Auto-merging src/backend/catalog/storage.c Auto-merging src/backend/catalog/pg_enum.c Auto-merging src/backend/access/transam/xlogutils.c Auto-merging src/backend/access/heap/rewriteheap.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 foreach_hash macro throughout the codebase 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/dblink/dblink.c M contrib/pg_stat_statements/pg_stat_statements.c M contrib/pg_trgm/trgm_regexp.c M contrib/postgres_fdw/connection.c M contrib/postgres_fdw/shippable.c M src/backend/access/heap/rewriteheap.c M src/backend/access/transam/xlogutils.c M src/backend/catalog/pg_enum.c M src/backend/catalog/storage.c M src/backend/commands/prepare.c M src/backend/commands/tablecmds.c M src/backend/optimizer/util/predtest.c M src/backend/parser/parse_oper.c M src/backend/partitioning/partdesc.c M src/backend/postmaster/autovacuum.c M src/backend/replication/logical/relation.c M src/backend/replication/logical/reorderbuffer.c M src/backend/replication/pgoutput/pgoutput.c M src/backend/storage/buffer/bufmgr.c M src/backend/storage/ipc/shmem.c M src/backend/storage/ipc/standby.c M src/backend/storage/lmgr/lock.c M src/backend/storage/lmgr/lwlock.c M src/backend/storage/lmgr/predicate.c M src/backend/storage/smgr/smgr.c M src/backend/storage/sync/sync.c M src/backend/tsearch/ts_typanalyze.c M src/backend/utils/activity/wait_event.c M src/backend/utils/adt/array_typanalyze.c M src/backend/utils/cache/relcache.c M src/backend/utils/cache/relfilenumbermap.c M src/backend/utils/cache/spccache.c M src/backend/utils/cache/ts_cache.c M src/backend/utils/misc/guc.c M src/backend/utils/mmgr/portalmem.c === using patch(1) to apply patch ./v3-0005-Use-foreach_hash-macro-throughout-the-codebase.patch === patching file contrib/dblink/dblink.c patching file contrib/pg_stat_statements/pg_stat_statements.c patching file contrib/pg_trgm/trgm_regexp.c patching file contrib/postgres_fdw/connection.c patching file contrib/postgres_fdw/shippable.c patching file src/backend/access/heap/rewriteheap.c patching file src/backend/access/transam/xlogutils.c patching file src/backend/catalog/pg_enum.c patching file src/backend/catalog/storage.c patching file src/backend/commands/prepare.c patching file src/backend/commands/tablecmds.c patching file src/backend/optimizer/util/predtest.c patching file src/backend/parser/parse_oper.c patching file src/backend/partitioning/partdesc.c patching file src/backend/postmaster/autovacuum.c patching file src/backend/replication/logical/relation.c patching file src/backend/replication/logical/reorderbuffer.c Hunk #1 succeeded at 5247 (offset -3 lines). Hunk #2 succeeded at 5314 (offset -3 lines). patching file src/backend/replication/pgoutput/pgoutput.c patching file src/backend/storage/buffer/bufmgr.c patching file src/backend/storage/ipc/shmem.c patching file src/backend/storage/ipc/standby.c patching file src/backend/storage/lmgr/lock.c Hunk #6 succeeded at 3362 (offset -2 lines). Hunk #7 succeeded at 3431 (offset -2 lines). Hunk #8 succeeded at 3523 (offset -2 lines). Hunk #9 succeeded at 3544 (offset -2 lines). Hunk #10 succeeded at 3740 (offset -2 lines). Hunk #11 succeeded at 3875 (offset -2 lines). Hunk #12 succeeded at 4114 (offset -2 lines). Hunk #13 succeeded at 4135 (offset -2 lines). Hunk #14 succeeded at 4145 (offset -2 lines). Hunk #15 succeeded at 4240 (offset -2 lines). patching file src/backend/storage/lmgr/lwlock.c patching file src/backend/storage/lmgr/predicate.c Hunk #1 succeeded at 1440 with fuzz 2. Hunk #2 succeeded at 1459 (offset -2 lines). Hunk #3 succeeded at 2918 (offset -2 lines). Hunk #4 succeeded at 2973 (offset -2 lines). Hunk #5 succeeded at 4396 (offset -2 lines). Hunk #6 succeeded at 4429 (offset -2 lines). patching file src/backend/storage/smgr/smgr.c patching file src/backend/storage/sync/sync.c patching file src/backend/tsearch/ts_typanalyze.c Hunk #3 succeeded at 313 with fuzz 2. patching file src/backend/utils/activity/wait_event.c Hunk #2 succeeded at 311 with fuzz 1. patching file src/backend/utils/adt/array_typanalyze.c Hunk #5 succeeded at 457 with fuzz 2. Hunk #6 FAILED at 593. Hunk #7 succeeded at 681 (offset -1 lines). 1 out of 7 hunks FAILED -- saving rejects to file src/backend/utils/adt/array_typanalyze.c.rej patching file src/backend/utils/cache/relcache.c patching file src/backend/utils/cache/relfilenumbermap.c patching file src/backend/utils/cache/spccache.c patching file src/backend/utils/cache/ts_cache.c patching file src/backend/utils/misc/guc.c patching file src/backend/utils/mmgr/portalmem.c Unstaged changes after reset: M contrib/dblink/dblink.c M contrib/pg_stat_statements/pg_stat_statements.c M contrib/pg_trgm/trgm_regexp.c M contrib/postgres_fdw/connection.c M contrib/postgres_fdw/shippable.c M src/backend/access/heap/rewriteheap.c M src/backend/access/transam/xlogutils.c M src/backend/catalog/pg_enum.c M src/backend/catalog/storage.c M src/backend/commands/prepare.c M src/backend/commands/tablecmds.c M src/backend/optimizer/util/predtest.c M src/backend/parser/parse_oper.c M src/backend/partitioning/partdesc.c M src/backend/postmaster/autovacuum.c M src/backend/replication/logical/relation.c M src/backend/replication/logical/reorderbuffer.c M src/backend/replication/pgoutput/pgoutput.c M src/backend/storage/buffer/bufmgr.c M src/backend/storage/ipc/shmem.c M src/backend/storage/ipc/standby.c M src/backend/storage/lmgr/lock.c M src/backend/storage/lmgr/lwlock.c M src/backend/storage/lmgr/predicate.c M src/backend/storage/smgr/smgr.c M src/backend/storage/sync/sync.c M src/backend/tsearch/ts_typanalyze.c M src/backend/utils/activity/wait_event.c M src/backend/utils/adt/array_typanalyze.c M src/backend/utils/cache/relcache.c M src/backend/utils/cache/relfilenumbermap.c M src/backend/utils/cache/spccache.c M src/backend/utils/cache/ts_cache.c M src/backend/utils/misc/guc.c M src/backend/utils/mmgr/portalmem.c Removing src/backend/utils/adt/array_typanalyze.c.rej === using 'git apply' to apply patch ./v3-0005-Use-foreach_hash-macro-throughout-the-codebase.patch === Applied patch to 'contrib/dblink/dblink.c' cleanly. Applied patch to 'contrib/pg_stat_statements/pg_stat_statements.c' cleanly. Applied patch to 'contrib/pg_trgm/trgm_regexp.c' cleanly. Applied patch to 'contrib/postgres_fdw/connection.c' cleanly. Applied patch to 'contrib/postgres_fdw/shippable.c' cleanly. Applied patch to 'src/backend/access/heap/rewriteheap.c' cleanly. Applied patch to 'src/backend/access/transam/xlogutils.c' cleanly. Applied patch to 'src/backend/catalog/pg_enum.c' cleanly. Applied patch to 'src/backend/catalog/storage.c' cleanly. Applied patch to 'src/backend/commands/prepare.c' cleanly. Applied patch to 'src/backend/commands/tablecmds.c' cleanly. Applied patch to 'src/backend/optimizer/util/predtest.c' cleanly. Applied patch to 'src/backend/parser/parse_oper.c' cleanly. Applied patch to 'src/backend/partitioning/partdesc.c' cleanly. Applied patch to 'src/backend/postmaster/autovacuum.c' cleanly. Applied patch to 'src/backend/replication/logical/relation.c' cleanly. Applied patch to 'src/backend/replication/logical/reorderbuffer.c' cleanly. Applied patch to 'src/backend/replication/pgoutput/pgoutput.c' cleanly. Applied patch to 'src/backend/storage/buffer/bufmgr.c' cleanly. Applied patch to 'src/backend/storage/ipc/shmem.c' cleanly. Applied patch to 'src/backend/storage/ipc/standby.c' cleanly. Applied patch to 'src/backend/storage/lmgr/lock.c' cleanly. Applied patch to 'src/backend/storage/lmgr/lwlock.c' cleanly. Applied patch to 'src/backend/storage/lmgr/predicate.c' cleanly. Applied patch to 'src/backend/storage/smgr/smgr.c' cleanly. Applied patch to 'src/backend/storage/sync/sync.c' cleanly. Applied patch to 'src/backend/tsearch/ts_typanalyze.c' cleanly. Applied patch to 'src/backend/utils/activity/wait_event.c' cleanly. Applied patch to 'src/backend/utils/adt/array_typanalyze.c' with conflicts. Applied patch to 'src/backend/utils/cache/relcache.c' cleanly. Applied patch to 'src/backend/utils/cache/relfilenumbermap.c' cleanly. Applied patch to 'src/backend/utils/cache/spccache.c' cleanly. Applied patch to 'src/backend/utils/cache/ts_cache.c' cleanly. Applied patch to 'src/backend/utils/misc/guc.c' cleanly. Applied patch to 'src/backend/utils/mmgr/portalmem.c' cleanly. U src/backend/utils/adt/array_typanalyze.c diff --cc src/backend/utils/adt/array_typanalyze.c index a36bfa9e04f,a5be7e4c1c3..00000000000 --- a/src/backend/utils/adt/array_typanalyze.c +++ b/src/backend/utils/adt/array_typanalyze.c @@@ -456,12 -455,11 +455,11 @@@ compute_array_stats(VacAttrStats *stats cutoff_freq = 9 * element_no / bucket_width; i = hash_get_num_entries(elements_tab); /* surely enough space */ - sort_table = (TrackItem **) palloc(sizeof(TrackItem *) * i); + sort_table = palloc_array(TrackItem *, i); - hash_seq_init(&scan_status, elements_tab); track_len = 0; maxfreq = 0; - while ((item = (TrackItem *) hash_seq_search(&scan_status)) != NULL) + foreach_hash(TrackItem, item, elements_tab) { if (item->frequency > cutoff_freq) { @@@ -593,10 -591,10 +591,15 @@@ * Create an array of DECountItem pointers, and sort them into * increasing count order. */ ++<<<<<<< ours + sorted_count_items = palloc_array(DECountItem *, count_items_count); + hash_seq_init(&scan_status, count_tab); ++======= + sorted_count_items = (DECountItem **) + palloc(sizeof(DECountItem *) * count_items_count); ++>>>>>>> theirs j = 0; - while ((count_item = (DECountItem *) hash_seq_search(&scan_status)) != NULL) + foreach_hash(DECountItem, count_item, count_tab) { sorted_count_items[j++] = count_item; }