diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 7271a8d29f..65a2101dc6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -834,7 +834,7 @@ jobs: run: shell: sh -eu {0} env: - VM_BUILDER_VERSION: v0.17.11 + VM_BUILDER_VERSION: v0.17.12 steps: - name: Checkout diff --git a/pgxn/neon/pagestore_smgr.c b/pgxn/neon/pagestore_smgr.c index 919bca03e9..2e4364cbfa 100644 --- a/pgxn/neon/pagestore_smgr.c +++ b/pgxn/neon/pagestore_smgr.c @@ -1790,6 +1790,14 @@ neon_zeroextend(SMgrRelation reln, ForkNumber forkNum, BlockNumber blocknum, if (!XLogInsertAllowed()) return; + /* ensure we have enough xlog buffers to log max-sized records */ + XLogEnsureRecordSpace(Min(remblocks, (XLR_MAX_BLOCK_ID - 1)), 0); + + /* + * Iterate over all the pages. They are collected into batches of + * XLR_MAX_BLOCK_ID pages, and a single WAL-record is written for each + * batch. + */ while (remblocks > 0) { int count = Min(remblocks, XLR_MAX_BLOCK_ID);