=== Applying patches on top of PostgreSQL commit ID bc192c898b21e7479d51f7537e8f407672dfbe20 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Wed Nov 11 15:01:31 UTC 2026 On branch cf/7351 nothing to commit, working tree clean === using 'git am' to apply patch ./v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin-PG15-PG16.patch === Applying: Fix crash decoding a change to a partition pending detach. Using index info to reconstruct a base tree... M src/backend/catalog/partition.c M src/backend/replication/pgoutput/pgoutput.c Falling back to patching base and 3-way merge... Auto-merging src/backend/replication/pgoutput/pgoutput.c CONFLICT (content): Merge conflict in src/backend/replication/pgoutput/pgoutput.c Auto-merging src/backend/catalog/partition.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 Fix crash decoding a change to a partition pending detach. 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 ./v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin-PG15-PG16.patch === patching file contrib/test_decoding/expected/concurrent_ddl_dml.out patching file contrib/test_decoding/specs/concurrent_ddl_dml.spec patching file src/backend/catalog/partition.c Hunk #1 succeeded at 126 with fuzz 2 (offset 1 line). patching file src/backend/replication/pgoutput/pgoutput.c Hunk #1 succeeded at 2103 (offset 54 lines). Hunk #2 FAILED at 2167. Hunk #3 succeeded at 2272 (offset 86 lines). Hunk #4 succeeded at 2373 (offset 89 lines). 1 out of 4 hunks FAILED -- saving rejects to file src/backend/replication/pgoutput/pgoutput.c.rej Unstaged changes after reset: M contrib/test_decoding/expected/concurrent_ddl_dml.out M contrib/test_decoding/specs/concurrent_ddl_dml.spec M src/backend/catalog/partition.c M src/backend/replication/pgoutput/pgoutput.c Removing src/backend/replication/pgoutput/pgoutput.c.rej === using 'git apply' to apply patch ./v3-0001-Fix-crash-decoding-a-change-to-a-partition-pendin-PG15-PG16.patch === Applied patch to 'contrib/test_decoding/expected/concurrent_ddl_dml.out' cleanly. Applied patch to 'contrib/test_decoding/specs/concurrent_ddl_dml.spec' cleanly. Applied patch to 'src/backend/catalog/partition.c' cleanly. Applied patch to 'src/backend/replication/pgoutput/pgoutput.c' with conflicts. U src/backend/replication/pgoutput/pgoutput.c diff --cc src/backend/replication/pgoutput/pgoutput.c index c8caa163c15,565775431d8..00000000000 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@@ -2209,47 -2166,12 +2219,55 @@@ get_rel_sync_entry(PGOutputData *data, */ if (pub->alltables) { ++<<<<<<< ours + List *exceptpubids = NIL; + + if (am_partition) + { + List *ancestors = get_partition_ancestors(relid); + Oid last_ancestor_relid = llast_oid(ancestors); + + /* + * For a partition, changes are published via top-most + * ancestor when pubviaroot is true, so populate pub_relid + * accordingly. + */ + if (pub->pubviaroot) + { + pub_relid = last_ancestor_relid; + ancestor_level = list_length(ancestors); + } + + /* + * Only the top-most ancestor can appear in the EXCEPT + * clause. Therefore, for a partition, exclusion must be + * evaluated at the top-most ancestor. + */ + exceptpubids = GetRelationExcludedPublications(last_ancestor_relid); + } + else + { + /* + * For a regular table or a root partitioned table, check + * exclusion on table itself. + */ + exceptpubids = GetRelationExcludedPublications(pub_relid); ++======= + publish = true; + if (pub->pubviaroot && ancestors) + { + pub_relid = llast_oid(ancestors); + ancestor_level = list_length(ancestors); ++>>>>>>> theirs } + + if (!list_member_oid(exceptpubids, pub->oid)) + publish = true; + + list_free(exceptpubids); + + if (!publish) + continue; } if (!publish)