=== Applying patches on top of PostgreSQL commit ID 6918434a4acb2b14535b3c1be30d306666db7c24 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Feb 1 11:15:31 UTC 2026 On branch cf/6311 nothing to commit, working tree clean === using 'git am' to apply patch ./v7-0001-Add-WALRCV_CONNECTING-state-to-walreceiver.patch === Applying: Add WALRCV_CONNECTING state to walreceiver Using index info to reconstruct a base tree... M doc/src/sgml/monitoring.sgml M src/backend/replication/walreceiver.c M src/backend/replication/walreceiverfuncs.c M src/include/replication/walreceiver.h Falling back to patching base and 3-way merge... Auto-merging src/include/replication/walreceiver.h CONFLICT (content): Merge conflict in src/include/replication/walreceiver.h Auto-merging src/backend/replication/walreceiver.c CONFLICT (content): Merge conflict in src/backend/replication/walreceiver.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 Add WALRCV_CONNECTING state to walreceiver 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 src/backend/replication/walreceiver.c M src/include/replication/walreceiver.h === using patch(1) to apply patch ./v7-0001-Add-WALRCV_CONNECTING-state-to-walreceiver.patch === patching file doc/src/sgml/monitoring.sgml Hunk #1 succeeded at 1751 with fuzz 1. patching file src/backend/replication/walreceiver.c Hunk #2 FAILED at 205. Hunk #3 FAILED at 215. Hunk #4 succeeded at 407 with fuzz 2 (offset 12 lines). Hunk #5 FAILED at 661. Hunk #6 FAILED at 700. Hunk #7 FAILED at 803. Hunk #8 FAILED at 1402. 6 out of 8 hunks FAILED -- saving rejects to file src/backend/replication/walreceiver.c.rej patching file src/backend/replication/walreceiverfuncs.c Hunk #1 FAILED at 179. Hunk #2 FAILED at 211. 2 out of 2 hunks FAILED -- saving rejects to file src/backend/replication/walreceiverfuncs.c.rej patching file src/include/replication/walreceiver.h Hunk #1 FAILED at 47. 1 out of 1 hunk FAILED -- saving rejects to file src/include/replication/walreceiver.h.rej Unstaged changes after reset: M doc/src/sgml/monitoring.sgml M src/backend/replication/walreceiver.c Removing src/backend/replication/walreceiver.c.rej Removing src/backend/replication/walreceiverfuncs.c.rej Removing src/include/replication/walreceiver.h.rej === using 'git apply' to apply patch ./v7-0001-Add-WALRCV_CONNECTING-state-to-walreceiver.patch === Applied patch to 'doc/src/sgml/monitoring.sgml' cleanly. Applied patch to 'src/backend/replication/walreceiver.c' with conflicts. Applied patch to 'src/backend/replication/walreceiverfuncs.c' cleanly. Applied patch to 'src/include/replication/walreceiver.h' with conflicts. U src/backend/replication/walreceiver.c U src/include/replication/walreceiver.h diff --cc src/backend/replication/walreceiver.c index 8b99160ed0e,abf7395526b..00000000000 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@@ -397,10 -397,10 +397,17 @@@ WalReceiverMain(const void *startup_dat first_stream = false; /* ++<<<<<<< ours + * Switch to STREAMING after a successful connection if current + * state is CONNECTING. This switch happens after an initial + * startup, or after a restart as determined by + * WalRcvWaitForStartPosition(). ++======= + * Switch to STREAMING after a successful connection, or after a + * restart handoff from WalRcvWaitForStartPosition(). Only update + * if still CONNECTING; otherwise the startup process has changed + * state and the existing control flow will handle it. ++>>>>>>> theirs */ SpinLockAcquire(&walrcv->mutex); if (walrcv->walRcvState == WALRCV_CONNECTING) diff --cc src/include/replication/walreceiver.h index 9b9bd916314,4387821469b..00000000000 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@@ -47,7 -47,8 +47,12 @@@ typedef enu WALRCV_STOPPED, /* stopped and mustn't start up again */ WALRCV_STARTING, /* launched, but the process hasn't * initialized yet */ ++<<<<<<< ours + WALRCV_CONNECTING, /* connecting to upstream server */ ++======= + WALRCV_CONNECTING, /* connecting to upstream server, replication + * not yet started */ ++>>>>>>> theirs WALRCV_STREAMING, /* walreceiver is streaming */ WALRCV_WAITING, /* stopped streaming, waiting for orders */ WALRCV_RESTARTING, /* asked to restart streaming */