=== Applying patches on top of PostgreSQL commit ID 4255812efdbcf7f1acf6be2211e1b5b11c4d4240 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Wed Nov 25 23:02:36 UTC 2026 On branch cf/7711 nothing to commit, working tree clean === using 'git am' to apply patch ./v4-0001-Don-t-wait-for-LogicalDecodingControlLock-in-the-.patch === Applying: Don't wait for LogicalDecodingControlLock in the postmaster Using index info to reconstruct a base tree... M src/backend/replication/logical/logicalctl.c M src/backend/replication/logical/slotsync.c M src/include/replication/logicalctl.h Falling back to patching base and 3-way merge... Auto-merging src/include/replication/logicalctl.h CONFLICT (content): Merge conflict in src/include/replication/logicalctl.h Auto-merging src/backend/replication/logical/slotsync.c 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 Don't wait for LogicalDecodingControlLock in the postmaster 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 ./v4-0001-Don-t-wait-for-LogicalDecodingControlLock-in-the-.patch === patching file src/backend/replication/logical/logicalctl.c Hunk #2 succeeded at 264 with fuzz 1 (offset 24 lines). patching file src/backend/replication/logical/slotsync.c patching file src/include/replication/logicalctl.h Hunk #1 FAILED at 20. 1 out of 1 hunk FAILED -- saving rejects to file src/include/replication/logicalctl.h.rej Unstaged changes after reset: M src/backend/replication/logical/logicalctl.c M src/backend/replication/logical/slotsync.c Removing src/include/replication/logicalctl.h.rej === using 'git apply' to apply patch ./v4-0001-Don-t-wait-for-LogicalDecodingControlLock-in-the-.patch === Applied patch to 'src/backend/replication/logical/logicalctl.c' with conflicts. Applied patch to 'src/backend/replication/logical/slotsync.c' cleanly. Applied patch to 'src/include/replication/logicalctl.h' with conflicts. U src/backend/replication/logical/logicalctl.c U src/include/replication/logicalctl.h diff --cc src/backend/replication/logical/logicalctl.c index f606fb30d9d,0e63e5f2698..00000000000 --- a/src/backend/replication/logical/logicalctl.c +++ b/src/backend/replication/logical/logicalctl.c @@@ -241,25 -241,16 +243,38 @@@ IsLogicalDecodingEnabled(void } /* ++<<<<<<< ours + * Return the end LSN of the last XLOG_LOGICAL_DECODING_STATUS_CHANGE record + * that enabled logical decoding during recovery, or InvalidXLogRecPtr if + * none has occurred since the server started. + * + * last_enable_lsn is maintained only during recovery, so this is + * intended for callers that have checked RecoveryInProgress(). Unlike + * StandbyLogicalDecodingEnabledSince(), we do not assert RecoveryInProgress() + * here because recovery may end concurrently right after the caller's check. + */ +XLogRecPtr +GetLogicalDecodingEnabledLSN(void) +{ + XLogRecPtr lsn; + + LWLockAcquire(LogicalDecodingControlLock, LW_SHARED); + lsn = LogicalDecodingCtl->last_enable_lsn; + LWLockRelease(LogicalDecodingControlLock); + + return lsn; ++======= + * Like IsLogicalDecodingEnabled(), but read the flag without taking + * LogicalDecodingControlLock. + * + * This is for the postmaster, which has no PGPROC and so must not wait for + * an LWLock. The result may be stale; callers must tolerate that. + */ + bool + IsLogicalDecodingEnabledNoLock(void) + { + return LogicalDecodingCtl->logical_decoding_enabled; ++>>>>>>> theirs } /* diff --cc src/include/replication/logicalctl.h index 4aa4e5cac7a,f6387169a74..00000000000 --- a/src/include/replication/logicalctl.h +++ b/src/include/replication/logicalctl.h @@@ -20,7 -20,7 +20,11 @@@ extern void StartupLogicalDecodingStatu extern void InitializeProcessXLogLogicalInfo(void); extern bool ProcessBarrierUpdateXLogLogicalInfo(void); extern bool IsLogicalDecodingEnabled(void); ++<<<<<<< ours +extern XLogRecPtr GetLogicalDecodingEnabledLSN(void); ++======= + extern bool IsLogicalDecodingEnabledNoLock(void); ++>>>>>>> theirs extern bool StandbyLogicalDecodingEnabledSince(XLogRecPtr lsn); extern bool IsXLogLogicalInfoEnabled(void); extern void AtEOXact_LogicalCtl(void);