From 095747afc0948aa6f449967ec48d1e8ac8aab6b0 Mon Sep 17 00:00:00 2001 From: Arthur Petukhovsky Date: Fri, 28 Jul 2023 21:18:08 +0000 Subject: [PATCH] Fix walproposer main loop --- pgxn/neon/walproposer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pgxn/neon/walproposer.c b/pgxn/neon/walproposer.c index defb9bd0a8..0cef914c5c 100644 --- a/pgxn/neon/walproposer.c +++ b/pgxn/neon/walproposer.c @@ -2299,7 +2299,9 @@ HandleSafekeeperResponse(void) { /* Get ReplicationFeedback fields from the most advanced safekeeper */ GetLatestNeonFeedback(&quorumFeedback.rf); + #ifndef SIMLIB SetZenithCurrentClusterSize(quorumFeedback.rf.currentClusterSize); + #endif } if (minQuorumLsn > quorumFeedback.flushLsn || diskConsistentLsn != quorumFeedback.rf.ps_flushlsn) @@ -2308,6 +2310,7 @@ HandleSafekeeperResponse(void) if (minQuorumLsn > quorumFeedback.flushLsn) quorumFeedback.flushLsn = minQuorumLsn; + #ifndef SIMLIB /* advance the replication slot */ if (!syncSafekeepers) ProcessStandbyReply( @@ -2322,18 +2325,21 @@ HandleSafekeeperResponse(void) */ quorumFeedback.rf.ps_flushlsn, GetCurrentTimestamp(), false); + #endif } CombineHotStanbyFeedbacks(&hsFeedback); if (hsFeedback.ts != 0 && memcmp(&hsFeedback, &quorumFeedback.hs, sizeof hsFeedback) != 0) { quorumFeedback.hs = hsFeedback; + #ifndef SIMLIB if (!syncSafekeepers) ProcessStandbyHSFeedback(hsFeedback.ts, XidFromFullTransactionId(hsFeedback.xmin), EpochFromFullTransactionId(hsFeedback.xmin), XidFromFullTransactionId(hsFeedback.catalog_xmin), EpochFromFullTransactionId(hsFeedback.catalog_xmin)); + #endif } /*