=== Applying patches on top of PostgreSQL commit ID f58ab18a90460cd297249bc80b13d84b2671bf0c === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sat Oct 10 05:39:30 UTC 2026 On branch cf/7338 nothing to commit, working tree clean === using 'git am' to apply patch ./v3-0001-Rename-PGAlignedXLogBlock-to-PGIOAlignedXLogBlock.patch === Applying: Rename PGAlignedXLogBlock to PGIOAlignedXLogBlock === using 'git am' to apply patch ./v3-0002-Use-C11-alignas-instead-of-palloc-malloc-for-alig.patch === Applying: Use C11 alignas instead of palloc/malloc for alignment error: sha1 information is lacking or useless (src/bin/pg_resetwal/pg_resetwal.c). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Use C11 alignas instead of palloc/malloc for alignment 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 ./v3-0002-Use-C11-alignas-instead-of-palloc-malloc-for-alig.patch === patching file src/backend/access/transam/xloginsert.c Hunk #3 FAILED at 1429. 1 out of 3 hunks FAILED -- saving rejects to file src/backend/access/transam/xloginsert.c.rej patching file src/backend/access/transam/xlogreader.c Hunk #1 succeeded at 126 (offset 7 lines). Hunk #2 succeeded at 137 (offset 7 lines). Hunk #3 FAILED at 155. 1 out of 3 hunks FAILED -- saving rejects to file src/backend/access/transam/xlogreader.c.rej patching file src/backend/access/transam/xlogrecovery.c patching file src/backend/commands/sequence_xlog.c patching file src/backend/storage/file/copydir.c patching file src/backend/storage/ipc/dsm_impl.c patching file src/backend/storage/smgr/md.c patching file src/bin/pg_resetwal/pg_resetwal.c Hunk #1 succeeded at 603 (offset 2 lines). Hunk #2 succeeded at 623 (offset 2 lines). patching file src/include/access/xlogreader.h Hunk #1 succeeded at 271 (offset 11 lines). Unstaged changes after reset: M src/backend/access/transam/xloginsert.c M src/backend/access/transam/xlogreader.c M src/backend/access/transam/xlogrecovery.c M src/backend/commands/sequence_xlog.c M src/backend/storage/file/copydir.c M src/backend/storage/ipc/dsm_impl.c M src/backend/storage/smgr/md.c M src/bin/pg_resetwal/pg_resetwal.c M src/include/access/xlogreader.h Removing src/backend/access/transam/xloginsert.c.rej Removing src/backend/access/transam/xlogreader.c.rej === using 'git apply' to apply patch ./v3-0002-Use-C11-alignas-instead-of-palloc-malloc-for-alig.patch === Applied patch to 'src/backend/access/transam/xloginsert.c' with conflicts. Applied patch to 'src/backend/access/transam/xlogreader.c' with conflicts. Applied patch to 'src/backend/access/transam/xlogrecovery.c' cleanly. Applied patch to 'src/backend/commands/sequence_xlog.c' cleanly. Applied patch to 'src/backend/storage/file/copydir.c' cleanly. Applied patch to 'src/backend/storage/ipc/dsm_impl.c' cleanly. Applied patch to 'src/backend/storage/smgr/md.c' cleanly. error: repository lacks the necessary blob to perform 3-way merge. Falling back to direct application... Applied patch to 'src/include/access/xlogreader.h' cleanly. U src/backend/access/transam/xloginsert.c U src/backend/access/transam/xlogreader.c diff --cc src/backend/access/transam/xloginsert.c index 2195df85b10,70cbe9d709b..00000000000 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@@ -1430,16 -1429,4 +1429,19 @@@ InitXLogInsert(void sizeof(XLogRecData) * XLR_NORMAL_RDATAS); max_rdatas = XLR_NORMAL_RDATAS; } ++<<<<<<< ours + + /* + * Allocate a buffer to hold the header information for a WAL record. + */ + if (hdr_scratch == NULL) + hdr_scratch = MemoryContextAllocZero(xloginsert_cxt, + HEADER_SCRATCH_SIZE); + + /* Extra initialization for wal_debug */ +#ifdef WAL_DEBUG + InitWalDebug(); +#endif ++======= ++>>>>>>> theirs } diff --cc src/backend/access/transam/xlogreader.c index 1db5ca48c3f,3cd86dedc25..00000000000 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@@ -184,17 -155,6 +168,20 @@@ XLogReaderFree(XLogReaderState *state pfree(state->errormsg_buf); if (state->readRecordBuf) pfree(state->readRecordBuf); ++<<<<<<< ours +#ifdef USE_ZSTD + if (state->zstd_dctx != NULL) + { +#ifndef FRONTEND + MemoryContextUnregisterResetCallback(GetMemoryChunkContext(state), + &state->zstd_dctx_cb); +#endif + ZSTD_freeDCtx(state->zstd_dctx); + } +#endif + pfree(state->readBuf); ++======= ++>>>>>>> theirs pfree(state); }