aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-10-31 12:44:48 +0900
committerMichael Paquier <michael@paquier.xyz>2022-10-31 12:44:48 +0900
commitd9d873bac67047cfacc9f5ef96ee488f2cb0f1c3 (patch)
tree5ba639609f866df4c3a3c5b4aa83af75844b6f36 /src/backend/storage/buffer/bufmgr.c
parenta9f8ca6005f1441b4e28272f744fb01fbc14b29f (diff)
downloadpostgresql-d9d873bac67047cfacc9f5ef96ee488f2cb0f1c3.tar.gz
postgresql-d9d873bac67047cfacc9f5ef96ee488f2cb0f1c3.zip
Clean up some inconsistencies with GUC declarations
This is similar to 7d25958, and this commit takes care of all the remaining inconsistencies between the initial value used in the C variable associated to a GUC and its default value stored in the GUC tables (as of pg_settings.boot_val). Some of the initial values of the GUCs updated rely on a compile-time default. These are refactored so as the GUC table and its C declaration use the same values. This makes everything consistent with other places, backend_flush_after, bgwriter_flush_after, port, checkpoint_flush_after doing so already, for example. Extracted from a larger patch by Peter Smith. The spots updated in the modules are from me. Author: Peter Smith, Michael Paquier Reviewed-by: Nathan Bossart, Tom Lane, Justin Pryzby Discussion: https://postgr.es/m/CAHut+PtHE0XSfjjRQ6D4v7+dqzCw=d+1a64ujra4EX8aoc_Z+w@mail.gmail.com
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r--src/backend/storage/buffer/bufmgr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 6b953814812..73d30bf6191 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -142,22 +142,22 @@ bool track_io_timing = false;
* for buffers not belonging to tablespaces that have their
* effective_io_concurrency parameter set.
*/
-int effective_io_concurrency = 0;
+int effective_io_concurrency = DEFAULT_EFFECTIVE_IO_CONCURRENCY;
/*
* Like effective_io_concurrency, but used by maintenance code paths that might
* benefit from a higher setting because they work on behalf of many sessions.
* Overridden by the tablespace setting of the same name.
*/
-int maintenance_io_concurrency = 0;
+int maintenance_io_concurrency = DEFAULT_MAINTENANCE_IO_CONCURRENCY;
/*
* GUC variables about triggering kernel writeback for buffers written; OS
* dependent defaults are set via the GUC mechanism.
*/
-int checkpoint_flush_after = 0;
-int bgwriter_flush_after = 0;
-int backend_flush_after = 0;
+int checkpoint_flush_after = DEFAULT_CHECKPOINT_FLUSH_AFTER;
+int bgwriter_flush_after = DEFAULT_BGWRITER_FLUSH_AFTER;
+int backend_flush_after = DEFAULT_BACKEND_FLUSH_AFTER;
/* local state for StartBufferIO and related functions */
static BufferDesc *InProgressBuf = NULL;