=== Applying patches on top of PostgreSQL commit ID 9d6db8bec19413cd0167f1e59d1af005a997bd3e === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Tue Mar 18 11:18:17 UTC 2025 On branch cf/5124 nothing to commit, working tree clean === using 'git am' to apply patch ./v1-0001-Fix-pg_control-corruption-in-EXEC_BACKEND-startup.patch === Applying: Fix pg_control corruption in EXEC_BACKEND startup. Using index info to reconstruct a base tree... M src/backend/access/transam/xlog.c M src/backend/postmaster/launch_backend.c M src/include/access/xlog.h Falling back to patching base and 3-way merge... Auto-merging src/include/access/xlog.h Auto-merging src/backend/postmaster/launch_backend.c CONFLICT (content): Merge conflict in src/backend/postmaster/launch_backend.c Auto-merging src/backend/access/transam/xlog.c CONFLICT (content): Merge conflict in 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 Fix pg_control corruption in EXEC_BACKEND startup. 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/access/transam/xlog.c M src/backend/postmaster/launch_backend.c M src/include/access/xlog.h === using patch(1) to apply patch ./v1-0001-Fix-pg_control-corruption-in-EXEC_BACKEND-startup.patch === patch: unrecognized option `--no-backup-if-mismatch' usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory] [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count] [-r rej-name] [-V t | nil | never | none] [-x number] [-z backup-ext] [--posix] [origfile [patchfile]] patch >>>>>> theirs int r; /* diff --cc src/backend/postmaster/launch_backend.c index 77fb877dbad,40efe738ae1..00000000000 --- a/src/backend/postmaster/launch_backend.c +++ b/src/backend/postmaster/launch_backend.c @@@ -33,9 -33,16 +33,15 @@@ #include ++<<<<<<< ours ++======= + #include "access/xlog.h" + #include "catalog/pg_control.h" + #include "common/file_utils.h" ++>>>>>>> theirs #include "libpq/libpq-be.h" -#include "libpq/pqsignal.h" #include "miscadmin.h" -#include "nodes/queryjumble.h" -#include "port.h" #include "postmaster/autovacuum.h" -#include "postmaster/auxprocess.h" #include "postmaster/bgworker_internals.h" #include "postmaster/bgwriter.h" #include "postmaster/fork_process.h" @@@ -129,8 -136,14 +135,16 @@@ typedef struc char my_exec_path[MAXPGPATH]; char pkglib_path[MAXPGPATH]; + int MyPMChildSlot; + + /* + * A copy of the ControlFileData from early in Postmaster startup. We + * need to access its contents it at a phase of initialization before we + * are allowed to acquire LWLocks, so we can't just use shared memory or + * read the file from disk. + */ + ControlFileData proto_controlfile; + /* * These are only used by backend processes, but are here because passing * a socket needs some special handling on Windows. 'client_sock' is an @@@ -778,8 -748,9 +786,10 @@@ save_backend_variables(BackendParameter param->max_safe_fds = max_safe_fds; param->MaxBackends = MaxBackends; + param->num_pmchild_slots = num_pmchild_slots; + ExportProtoControlFile(¶m->proto_controlfile); + #ifdef WIN32 param->PostmasterHandle = PostmasterHandle; if (!write_duplicated_handle(¶m->initial_signal_pipe,