From: Andres Freund Date: Tue, 24 Oct 2023 16:00:18 -0700 Subject: [PATCH v1 1/2] xlog.c: Rename misleadingly named variable --- src/backend/access/transam/xlog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 40461923ea3..6065fd63b8b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2784,7 +2784,7 @@ XLogBackgroundFlush(void) bool flexible = true; static TimestampTz lastflush; TimestampTz now; - int flushbytes; + int flushblocks; TimeLineID insertTLI; /* XLOG doesn't need flushing during recovery */ @@ -2838,7 +2838,7 @@ XLogBackgroundFlush(void) * wal_writer_flush_after GUCs. */ now = GetCurrentTimestamp(); - flushbytes = + flushblocks = WriteRqst.Write / XLOG_BLCKSZ - LogwrtResult.Flush / XLOG_BLCKSZ; if (WalWriterFlushAfter == 0 || lastflush == 0) @@ -2857,7 +2857,7 @@ XLogBackgroundFlush(void) WriteRqst.Flush = WriteRqst.Write; lastflush = now; } - else if (flushbytes >= WalWriterFlushAfter) + else if (flushblocks >= WalWriterFlushAfter) { /* exceeded wal_writer_flush_after blocks, flush */ WriteRqst.Flush = WriteRqst.Write; -- 2.38.0 --2b5v5jikkdq6e7z5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0002-Reduce-rate-of-wakeups-of-walsender-due-to-async-.patch"