From 49204b6a593c95330d3c10d11205a7ec8625ebca Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 30 Jul 2025 22:01:04 +0300 Subject: [PATCH] don't try to update the legacy last-written LSN cache with new communicator --- pgxn/neon/pagestore_smgr.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pgxn/neon/pagestore_smgr.c b/pgxn/neon/pagestore_smgr.c index c961f252f2..c656ba9fef 100644 --- a/pgxn/neon/pagestore_smgr.c +++ b/pgxn/neon/pagestore_smgr.c @@ -437,11 +437,17 @@ neon_wallog_page(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum, co forknum, LSN_FORMAT_ARGS(lsn)))); } - /* - * Remember the LSN on this page. When we read the page again, we must - * read the same or newer version of it. - */ - neon_set_lwlsn_block(lsn, InfoFromSMgrRel(reln), forknum, blocknum); + if (!neon_use_communicator_worker) + { + /* + * Remember the LSN on this page. When we read the page again, we must + * read the same or newer version of it. + * + * (With the new communicator, the caller will make a write-request + * for this page, which updates the last-written LSN too) + */ + neon_set_lwlsn_block(lsn, InfoFromSMgrRel(reln), forknum, blocknum); + } } /*