From 63932a6d38e5dfa6df2a51a04b7314ec1e4d3de7 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 15 May 2023 10:45:19 +1200 Subject: Fix wal_writer_flush_after initializer value. Commit a73952b7956 (new in 16) required default values in guc_table.c and C variable initializers to match. This one only matched when XLOG_BLCKSZ == 8kB. Fix by using the same expression in both places with a new DEFAULT_XXX macro, as done for other GUCs. Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA+hUKGLNmLV=VrT==5MqnbARgx2ifRSFtdd8ofdfrdSLL3yv5A@mail.gmail.com --- src/include/postmaster/walwriter.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/postmaster/walwriter.h b/src/include/postmaster/walwriter.h index 22281a97ba0..6eba7ad79cf 100644 --- a/src/include/postmaster/walwriter.h +++ b/src/include/postmaster/walwriter.h @@ -12,6 +12,8 @@ #ifndef _WALWRITER_H #define _WALWRITER_H +#define DEFAULT_WAL_WRITER_FLUSH_AFTER ((1024 * 1024) / XLOG_BLCKSZ) + /* GUC options */ extern PGDLLIMPORT int WalWriterDelay; extern PGDLLIMPORT int WalWriterFlushAfter; -- cgit v1.2.3