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 <[email protected]>
Discussion: https://postgr.es/m/CA+hUKGLNmLV=VrT==5MqnbARgx2ifRSFtdd8ofdfrdSLL3yv5A@mail.gmail.com
* GUC parameters
*/
int WalWriterDelay = 200;
-int WalWriterFlushAfter = 128;
+int WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER;
/*
* Number of do-nothing loops before lengthening the delay time, and the
GUC_UNIT_XBLOCKS
},
&WalWriterFlushAfter,
- (1024 * 1024) / XLOG_BLCKSZ, 0, INT_MAX,
+ DEFAULT_WAL_WRITER_FLUSH_AFTER, 0, INT_MAX,
NULL, NULL, NULL
},
#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;