=== Applying patches on top of PostgreSQL commit ID 29fffc1a66456babfba35771b9ec644e3137164a === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Nov 7 17:43:27 UTC 2026 On branch cf/7546 nothing to commit, working tree clean === using 'git am' to apply patch ./v6-0001-pgstat-Add-kind-filter-to-pgstat_drop_matching_en.patch === Applying: pgstat: Add kind filter to pgstat_drop_matching_entries Using index info to reconstruct a base tree... M src/backend/utils/activity/pgstat_shmem.c M src/include/utils/pgstat_internal.h M src/test/modules/test_custom_stats/t/001_custom_stats.pl M src/test/modules/test_custom_stats/test_custom_var_stats--1.0.sql M src/test/modules/test_custom_stats/test_custom_var_stats.c Falling back to patching base and 3-way merge... Auto-merging src/test/modules/test_custom_stats/t/001_custom_stats.pl CONFLICT (content): Merge conflict in src/test/modules/test_custom_stats/t/001_custom_stats.pl Auto-merging src/backend/utils/activity/pgstat_shmem.c CONFLICT (content): Merge conflict in src/backend/utils/activity/pgstat_shmem.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 pgstat: Add kind filter to pgstat_drop_matching_entries 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". === using patch(1) to apply patch ./v6-0001-pgstat-Add-kind-filter-to-pgstat_drop_matching_en.patch === patching file src/backend/utils/activity/pgstat_shmem.c Hunk #1 FAILED at 1229. Hunk #2 FAILED at 1278. 2 out of 2 hunks FAILED -- saving rejects to file src/backend/utils/activity/pgstat_shmem.c.rej patching file src/include/utils/pgstat_internal.h Hunk #1 FAILED at 843. 1 out of 1 hunk FAILED -- saving rejects to file src/include/utils/pgstat_internal.h.rej patching file src/test/modules/test_custom_stats/t/001_custom_stats.pl Hunk #1 FAILED at 114. 1 out of 1 hunk FAILED -- saving rejects to file src/test/modules/test_custom_stats/t/001_custom_stats.pl.rej patching file src/test/modules/test_custom_stats/test_custom_var_stats--1.0.sql Hunk #1 succeeded at 23 with fuzz 1 (offset 5 lines). patching file src/test/modules/test_custom_stats/test_custom_var_stats.c Hunk #1 succeeded at 653 with fuzz 1 (offset 18 lines). Hunk #2 FAILED at 674. Hunk #3 FAILED at 691. 2 out of 3 hunks FAILED -- saving rejects to file src/test/modules/test_custom_stats/test_custom_var_stats.c.rej Unstaged changes after reset: M src/test/modules/test_custom_stats/test_custom_var_stats--1.0.sql M src/test/modules/test_custom_stats/test_custom_var_stats.c Removing src/backend/utils/activity/pgstat_shmem.c.rej Removing src/include/utils/pgstat_internal.h.rej Removing src/test/modules/test_custom_stats/t/001_custom_stats.pl.rej Removing src/test/modules/test_custom_stats/test_custom_var_stats.c.rej === using 'git apply' to apply patch ./v6-0001-pgstat-Add-kind-filter-to-pgstat_drop_matching_en.patch === Applied patch to 'src/backend/utils/activity/pgstat_shmem.c' with conflicts. Applied patch to 'src/include/utils/pgstat_internal.h' cleanly. Applied patch to 'src/test/modules/test_custom_stats/t/001_custom_stats.pl' with conflicts. Applied patch to 'src/test/modules/test_custom_stats/test_custom_var_stats--1.0.sql' cleanly. Applied patch to 'src/test/modules/test_custom_stats/test_custom_var_stats.c' cleanly. U src/backend/utils/activity/pgstat_shmem.c U src/test/modules/test_custom_stats/t/001_custom_stats.pl diff --cc src/backend/utils/activity/pgstat_shmem.c index 8db33ac2fdf,524a0db3809..00000000000 --- a/src/backend/utils/activity/pgstat_shmem.c +++ b/src/backend/utils/activity/pgstat_shmem.c @@@ -1229,10 -1229,9 +1229,16 @@@ pgstat_drop_entry(PgStat_Kind kind, Oi /* * Scan through the stats hashtables, dropping statistics if approved by the ++<<<<<<< ours + * optional do_drop() function, or all entries if do_drop is NULL. + * + * If kind is PGSTAT_KIND_INVALID, all stats hashtables are scanned. Otherwise, + * only the hashtable of the specified kind is scanned. ++======= + * optional do_drop() function. If do_drop is NULL, drop all matching entries. + * If kind is PGSTAT_KIND_INVALID, match all kinds; otherwise only entries of + * the given kind match. ++>>>>>>> theirs */ void pgstat_drop_matching_entries(PgStat_Kind kind, diff --cc src/test/modules/test_custom_stats/t/001_custom_stats.pl index 484a2d73ff7,290e4175a31..00000000000 --- a/src/test/modules/test_custom_stats/t/001_custom_stats.pl +++ b/src/test/modules/test_custom_stats/t/001_custom_stats.pl @@@ -125,17 -125,14 +125,28 @@@ foreach my $stats_kind (@var_stats_kind # around to exercise filtering by kind before the callback is called. if ($own_hash eq 'f') { ++<<<<<<< ours + $node->safe_psql( + 'postgres', + q(CREATE TABLE test_custom_stats_shared_hash_rel(a int); + INSERT INTO test_custom_stats_shared_hash_rel VALUES (1); + SELECT pg_stat_force_next_flush())); + $result = $node->safe_psql( + 'postgres', + q(SELECT n_tup_ins FROM pg_stat_user_tables + WHERE relname = 'test_custom_stats_shared_hash_rel')); + is($result, "1", + "relation stats entry exists in shared hash for $kind_name"); ++======= + $node->safe_psql('postgres', + q(CREATE TABLE test_custom_stats_shared_hash_rel(a int); + INSERT INTO test_custom_stats_shared_hash_rel VALUES (1); + SELECT pg_stat_force_next_flush())); + $result = $node->safe_psql('postgres', + q(SELECT n_tup_ins FROM pg_stat_user_tables + WHERE relname = 'test_custom_stats_shared_hash_rel')); + is($result, "1", "relation stats entry exists in shared hash for $kind_name"); ++>>>>>>> theirs } # Test drop of variable-sized stats via pgstat_drop_matching_entries(). @@@ -147,13 -144,11 +158,21 @@@ if ($own_hash eq 'f') { # The relation stats entry should survive the custom stats drop. ++<<<<<<< ours + $result = $node->safe_psql( + 'postgres', + q(SELECT n_tup_ins FROM pg_stat_user_tables + WHERE relname = 'test_custom_stats_shared_hash_rel')); + is($result, "1", + "relation stats entry remains after custom stats drop for $kind_name" + ); ++======= + $result = $node->safe_psql('postgres', + q(SELECT n_tup_ins FROM pg_stat_user_tables + WHERE relname = 'test_custom_stats_shared_hash_rel')); + is($result, "1", + "relation stats entry remains after custom stats drop for $kind_name"); ++>>>>>>> theirs } # Test persistence across clean restart.