mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
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 <andres@anarazel.de> Discussion: https://postgr.es/m/CA+hUKGLNmLV=VrT==5MqnbARgx2ifRSFtdd8ofdfrdSLL3yv5A@mail.gmail.com
This commit is contained in:
parent
319bae9a8d
commit
63932a6d38
@ -68,7 +68,7 @@
|
||||
* 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
|
||||
|
@ -2780,7 +2780,7 @@ struct config_int ConfigureNamesInt[] =
|
||||
GUC_UNIT_XBLOCKS
|
||||
},
|
||||
&WalWriterFlushAfter,
|
||||
(1024 * 1024) / XLOG_BLCKSZ, 0, INT_MAX,
|
||||
DEFAULT_WAL_WRITER_FLUSH_AFTER, 0, INT_MAX,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user