=== Applying patches on top of PostgreSQL commit ID 84705b37273da016633fc5c0a06e848bd6e1e71b === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Jan 16 12:43:26 UTC 2026 On branch cf/6043 nothing to commit, working tree clean === using 'git am' to apply patch ./v13-0001-Streamline-buffer-rejection-for-bulkreads-of-unl.patch === Applying: Streamline buffer rejection for bulkreads of unlogged tables Using index info to reconstruct a base tree... M src/backend/storage/buffer/bufmgr.c M src/backend/storage/buffer/freelist.c M src/include/storage/buf_internals.h Falling back to patching base and 3-way merge... Auto-merging src/include/storage/buf_internals.h Auto-merging src/backend/storage/buffer/freelist.c Auto-merging src/backend/storage/buffer/bufmgr.c CONFLICT (content): Merge conflict in src/backend/storage/buffer/bufmgr.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 Streamline buffer rejection for bulkreads of unlogged tables 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/storage/buffer/bufmgr.c M src/backend/storage/buffer/freelist.c M src/include/storage/buf_internals.h === using patch(1) to apply patch ./v13-0001-Streamline-buffer-rejection-for-bulkreads-of-unl.patch === patching file src/backend/storage/buffer/bufmgr.c Hunk #1 FAILED at 2483. Hunk #2 succeeded at 3435 (offset 19 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/storage/buffer/bufmgr.c.rej patching file src/backend/storage/buffer/freelist.c patching file src/include/storage/buf_internals.h Hunk #2 succeeded at 555 (offset 32 lines). Unstaged changes after reset: M src/backend/storage/buffer/bufmgr.c M src/backend/storage/buffer/freelist.c M src/include/storage/buf_internals.h Removing src/backend/storage/buffer/bufmgr.c.rej === using 'git apply' to apply patch ./v13-0001-Streamline-buffer-rejection-for-bulkreads-of-unl.patch === Applied patch to 'src/backend/storage/buffer/bufmgr.c' with conflicts. Applied patch to 'src/backend/storage/buffer/freelist.c' cleanly. Applied patch to 'src/include/storage/buf_internals.h' cleanly. U src/backend/storage/buffer/bufmgr.c diff --cc src/backend/storage/buffer/bufmgr.c index 6f935648ae9,67f9a210872..00000000000 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@@ -2517,25 -2483,14 +2517,31 @@@ again * If using a nondefault strategy, and writing the buffer would * require a WAL flush, let the strategy decide whether to go ahead * and write/reuse the buffer or to choose another victim. We need a - * lock to inspect the page LSN, so this can't be done inside + * content lock to inspect the page LSN, so this can't be done inside * StrategyGetBuffer. */ - if (strategy != NULL) + if (StrategyRejectBuffer(strategy, buf_hdr, from_ring)) { ++<<<<<<< ours + XLogRecPtr lsn; + + /* Read the LSN while holding buffer header lock */ + buf_state = LockBufHdr(buf_hdr); + lsn = BufferGetLSN(buf_hdr); + UnlockBufHdr(buf_hdr); + + if (XLogNeedsFlush(lsn) + && StrategyRejectBuffer(strategy, buf_hdr, from_ring)) + { + LockBuffer(buf, BUFFER_LOCK_UNLOCK); + UnpinBuffer(buf_hdr); + goto again; + } ++======= + LWLockRelease(content_lock); + UnpinBuffer(buf_hdr); + goto again; ++>>>>>>> theirs } /* OK, do the I/O */