=== Applying patches on top of PostgreSQL commit ID af090508018be5ace443ba6e2814500c10842a4d === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Oct 16 20:24:24 UTC 2026 On branch cf/7248 nothing to commit, working tree clean === using 'git am' to apply patch ./v3-0001-Fix-typos-in-logicalctl.c-comments.patch === Applying: Fix typos in logicalctl.c comments Using index info to reconstruct a base tree... M src/backend/replication/logical/logicalctl.c Falling back to patching base and 3-way merge... Auto-merging src/backend/replication/logical/logicalctl.c CONFLICT (content): Merge conflict in src/backend/replication/logical/logicalctl.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 typos in logicalctl.c comments 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-typos-in-logicalctl.c-comments.patch === patching file src/backend/replication/logical/logicalctl.c Hunk #1 FAILED at 28. Hunk #2 FAILED at 325. Hunk #3 FAILED at 354. Hunk #4 FAILED at 382. Hunk #5 FAILED at 676. 5 out of 5 hunks FAILED -- saving rejects to file src/backend/replication/logical/logicalctl.c.rej Removing src/backend/replication/logical/logicalctl.c.rej === using 'git apply' to apply patch ./v3-0001-Fix-typos-in-logicalctl.c-comments.patch === Applied patch to 'src/backend/replication/logical/logicalctl.c' with conflicts. U src/backend/replication/logical/logicalctl.c diff --cc src/backend/replication/logical/logicalctl.c index 182d15e5653,42a046618b1..00000000000 --- a/src/backend/replication/logical/logicalctl.c +++ b/src/backend/replication/logical/logicalctl.c @@@ -746,25 -674,16 +746,34 @@@ UpdateLogicalDecodingStatusEndOfRecover LWLockRelease(LogicalDecodingControlLock); /* ++<<<<<<< ours + * With wal_level = logical, XLogLogicalInfoActive() is always true, so no + * barrier is needed. + * + * Otherwise, notify all processes to refresh XLogLogicalInfo. Wait only + * if new_status is true, even if the shared status is unchanged, since + * recovery may have left stale caches. Writes are not yet allowed, so we + * need not wait for running transactions to finish. + * + * If new_status is false, stale caches only cause extra logical + * information in WAL, which is safe (see DisableLogicalDecoding()). ++======= + * Ensure all running processes have the updated status. We don't need to + * wait for running transactions to finish as we don't accept any writes + * yet. On the other hand, we need to wait for XLogLogicalInfo to be + * synchronized even if we've not updated the status above, as the status + * may have been turned on and off during recovery, leaving running + * processes with different values in their local caches. ++>>>>>>> theirs */ - if (IsUnderPostmaster) - WaitForProcSignalBarrier( - EmitProcSignalBarrier(PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO)); + if (IsUnderPostmaster && wal_level != WAL_LEVEL_LOGICAL) + { + uint64 generation; + + generation = EmitProcSignalBarrier(PROCSIGNAL_BARRIER_UPDATE_XLOG_LOGICAL_INFO); + if (new_status) + WaitForProcSignalBarrier(generation); + } INJECTION_POINT("startup-logical-decoding-status-change-end-of-recovery", NULL); }