=== Applying patches on top of PostgreSQL commit ID 3cf5264557bee2ba848e5276beecc10571d468a6 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Thu Jul 16 08:15:40 UTC 2026 On branch cf/5118 nothing to commit, working tree clean === using 'git am' to apply patch ./v13-0001-Refactor-how-some-aux-processes-advertise-their-.patch === Applying: Refactor how some aux processes advertise their ProcNumber Using index info to reconstruct a base tree... M src/backend/access/transam/xlog.c M src/backend/postmaster/autovacuum.c M src/backend/postmaster/checkpointer.c M src/backend/postmaster/walwriter.c M src/backend/storage/lmgr/proc.c M src/include/storage/proc.h Falling back to patching base and 3-way merge... Auto-merging src/include/storage/proc.h CONFLICT (content): Merge conflict in src/include/storage/proc.h Auto-merging src/backend/storage/lmgr/proc.c CONFLICT (content): Merge conflict in src/backend/storage/lmgr/proc.c Auto-merging src/backend/postmaster/checkpointer.c CONFLICT (content): Merge conflict in src/backend/postmaster/checkpointer.c Auto-merging src/backend/postmaster/autovacuum.c Auto-merging src/backend/access/transam/xlog.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 Refactor how some aux processes advertise their ProcNumber 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 ./v13-0001-Refactor-how-some-aux-processes-advertise-their-.patch === patching file src/backend/access/transam/xlog.c Hunk #1 FAILED at 2671. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/access/transam/xlog.c.rej patching file src/backend/postmaster/autovacuum.c Hunk #1 FAILED at 286. Hunk #2 FAILED at 302. Hunk #3 FAILED at 602. Hunk #4 FAILED at 837. Hunk #5 FAILED at 1569. Hunk #6 FAILED at 1587. Hunk #7 FAILED at 3559. 7 out of 7 hunks FAILED -- saving rejects to file src/backend/postmaster/autovacuum.c.rej patching file src/backend/postmaster/checkpointer.c Hunk #1 FAILED at 47. Hunk #2 FAILED at 358. Hunk #3 FAILED at 1120. Hunk #4 FAILED at 1261. Hunk #5 FAILED at 1543. 5 out of 5 hunks FAILED -- saving rejects to file src/backend/postmaster/checkpointer.c.rej patching file src/backend/postmaster/walwriter.c Hunk #1 FAILED at 206. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/postmaster/walwriter.c.rej patching file src/backend/storage/lmgr/proc.c Hunk #1 FAILED at 240. Hunk #2 succeeded at 722 with fuzz 2 (offset -3 lines). Hunk #3 succeeded at 1140 with fuzz 2 (offset 30 lines). 1 out of 3 hunks FAILED -- saving rejects to file src/backend/storage/lmgr/proc.c.rej patching file src/include/storage/proc.h Hunk #1 FAILED at 488. 1 out of 1 hunk FAILED -- saving rejects to file src/include/storage/proc.h.rej Unstaged changes after reset: M src/backend/storage/lmgr/proc.c Removing src/backend/access/transam/xlog.c.rej Removing src/backend/postmaster/autovacuum.c.rej Removing src/backend/postmaster/checkpointer.c.rej Removing src/backend/postmaster/walwriter.c.rej Removing src/backend/storage/lmgr/proc.c.rej Removing src/include/storage/proc.h.rej === using 'git apply' to apply patch ./v13-0001-Refactor-how-some-aux-processes-advertise-their-.patch === Applied patch to 'src/backend/access/transam/xlog.c' cleanly. Applied patch to 'src/backend/postmaster/autovacuum.c' cleanly. Applied patch to 'src/backend/postmaster/checkpointer.c' with conflicts. Applied patch to 'src/backend/postmaster/walwriter.c' cleanly. Applied patch to 'src/backend/storage/lmgr/proc.c' with conflicts. Applied patch to 'src/include/storage/proc.h' with conflicts. U src/backend/postmaster/checkpointer.c U src/backend/storage/lmgr/proc.c U src/include/storage/proc.h diff --cc src/backend/postmaster/checkpointer.c index f6351f1eb10,a09d4097d51..00000000000 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@@ -1114,7 -1114,8 +1114,12 @@@ RequestCheckpoint(int flags #define MAX_SIGNAL_TRIES 600 /* max wait 60.0 sec */ for (ntries = 0;; ntries++) { ++<<<<<<< ours + ProcNumber checkpointerProc = pg_atomic_read_u32(&ProcGlobal->checkpointerProc); ++======= + volatile PROC_HDR *procglobal = ProcGlobal; + ProcNumber checkpointerProc = pg_atomic_read_u32(&procglobal->checkpointerProc); ++>>>>>>> theirs if (checkpointerProc == INVALID_PROC_NUMBER) { @@@ -1535,7 -1536,8 +1540,12 @@@ FirstCallSinceLastCheckpoint(void void WakeupCheckpointer(void) { ++<<<<<<< ours + ProcNumber checkpointerProc = pg_atomic_read_u32(&ProcGlobal->checkpointerProc); ++======= + volatile PROC_HDR *procglobal = ProcGlobal; + ProcNumber checkpointerProc = pg_atomic_read_u32(&procglobal->checkpointerProc); ++>>>>>>> theirs if (checkpointerProc != INVALID_PROC_NUMBER) SetLatch(&GetPGProcByNumber(checkpointerProc)->procLatch); diff --cc src/backend/storage/lmgr/proc.c index 9d6e69175a5,28c0efc3e20..00000000000 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@@ -730,6 -727,8 +730,11 @@@ InitAuxiliaryProcess(void PGSemaphoreReset(MyProc->sem); /* Some aux processes are also advertised in ProcGlobal */ ++<<<<<<< ours ++======= + if (MyBackendType == B_AUTOVAC_LAUNCHER) + pg_atomic_write_u32(&ProcGlobal->avLauncherProc, MyProcNumber); ++>>>>>>> theirs if (MyBackendType == B_WAL_WRITER) pg_atomic_write_u32(&ProcGlobal->walwriterProc, MyProcNumber); if (MyBackendType == B_CHECKPOINTER) @@@ -1118,9 -1111,12 +1123,18 @@@ AuxiliaryProcKill(int code, Datum arg SwitchBackToLocalLatch(); pgstat_reset_wait_event_storage(); ++<<<<<<< ours + /* + * If this was one of the aux processes advertised in ProcGlobal, clear it + */ ++======= + /* If this was one of aux processes advertised in ProcGlobal, clear it */ + if (MyBackendType == B_AUTOVAC_LAUNCHER) + { + Assert(pg_atomic_read_u32(&ProcGlobal->avLauncherProc) == MyProcNumber); + pg_atomic_write_u32(&ProcGlobal->avLauncherProc, INVALID_PROC_NUMBER); + } ++>>>>>>> theirs if (MyBackendType == B_WAL_WRITER) { Assert(pg_atomic_read_u32(&ProcGlobal->walwriterProc) == MyProcNumber); diff --cc src/include/storage/proc.h index 03a1a466fa8,0314f979e60..00000000000 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@@ -491,10 -491,9 +491,16 @@@ typedef struct PROC_HD * Current proc numbers of some auxiliary processes. There can be only one * of each of these running at a time. */ ++<<<<<<< ours + pg_atomic_uint32 walwriterProc; + pg_atomic_uint32 checkpointerProc; + /* avlauncher is not an aux process, but it is advertised the same way */ + pg_atomic_uint32 avLauncherProc; ++======= + pg_atomic_uint32 avLauncherProc; + pg_atomic_uint32 walwriterProc; + pg_atomic_uint32 checkpointerProc; ++>>>>>>> theirs /* Current shared estimate of appropriate spins_per_delay value */ int spins_per_delay;