=== Applying patches on top of PostgreSQL commit ID 6c5c393b74031351721f8a44e55bfaf6f249eefb === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Thu Dec 4 06:20:23 UTC 2025 On branch cf/6279 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Fix-crash-during-recovery-when-redo-segment-is-missi.patch === Applying: Fix crash during recovery when redo segment is missing Using index info to reconstruct a base tree... M src/backend/access/transam/xlogrecovery.c Falling back to patching base and 3-way merge... Auto-merging src/backend/access/transam/xlogrecovery.c CONFLICT (content): Merge conflict in src/backend/access/transam/xlogrecovery.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 crash during recovery when redo segment is missing 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/xlogrecovery.c Removing src/test/recovery/t/044_redo_segment_missing.pl === using patch(1) to apply patch ./0001-Fix-crash-during-recovery-when-redo-segment-is-missi.patch === patching file src/backend/access/transam/xlogrecovery.c Hunk #1 FAILED at 780. Hunk #2 succeeded at 803 with fuzz 2 (offset 7 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/access/transam/xlogrecovery.c.rej patching file src/test/recovery/t/044_redo_segment_missing.pl Unstaged changes after reset: M src/backend/access/transam/xlogrecovery.c Removing src/backend/access/transam/xlogrecovery.c.rej Removing src/test/recovery/t/044_redo_segment_missing.pl === using 'git apply' to apply patch ./0001-Fix-crash-during-recovery-when-redo-segment-is-missi.patch === Applied patch to 'src/backend/access/transam/xlogrecovery.c' with conflicts. Falling back to direct application... U src/backend/access/transam/xlogrecovery.c diff --cc src/backend/access/transam/xlogrecovery.c index 21b8f179ba0,c9c341e5dc7..00000000000 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@@ -787,9 -780,21 +787,26 @@@ InitWalRecovery(ControlFileData *Contro CheckPointTLI); if (record != NULL) { + memcpy(&checkPoint, XLogRecGetData(xlogreader), sizeof(CheckPoint)); + wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN); ereport(DEBUG1, ++<<<<<<< ours + errmsg_internal("checkpoint record is at %X/%08X", + LSN_FORMAT_ARGS(CheckPointLoc))); ++======= + (errmsg_internal("checkpoint record is at %X/%X", + LSN_FORMAT_ARGS(CheckPointLoc)))); + + /* Make sure that REDO location exists. */ + if (RedoStartLSN < CheckPointLoc) + { + XLogPrefetcherBeginRead(xlogprefetcher, RedoStartLSN); + if (!ReadRecord(xlogprefetcher, LOG, false, RedoStartTLI)) + ereport(PANIC, + (errmsg("could not find redo location %X/%X referenced by checkpoint record at %X/%X", + LSN_FORMAT_ARGS(RedoStartLSN), LSN_FORMAT_ARGS(CheckPointLoc)))); + } ++>>>>>>> theirs } else { @@@ -800,11 -805,9 +817,9 @@@ * simplify processing around checkpoints. */ ereport(PANIC, - (errmsg("could not locate a valid checkpoint record at %X/%X", - LSN_FORMAT_ARGS(CheckPointLoc)))); + errmsg("could not locate a valid checkpoint record at %X/%08X", + LSN_FORMAT_ARGS(CheckPointLoc))); } - memcpy(&checkPoint, XLogRecGetData(xlogreader), sizeof(CheckPoint)); - wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN); } if (ArchiveRecoveryRequested)