diff options
author | Andres Freund <andres@anarazel.de> | 2016-04-24 12:26:55 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2016-04-24 12:26:55 -0700 |
commit | 8f91d87d43d021db92c6edd966a4bb8c3a81ae39 (patch) | |
tree | c7fa6c68b3d06dacadbdd6deefb6b0d4742b5941 /src | |
parent | 0ab3595e5bb53a8fc2cd231320b1af1ae3ed68e0 (diff) | |
download | postgresql-8f91d87d43d021db92c6edd966a4bb8c3a81ae39.tar.gz postgresql-8f91d87d43d021db92c6edd966a4bb8c3a81ae39.zip |
Fix documentation & config inconsistencies around 428b1d6b2.
Several issues:
1) checkpoint_flush_after doc and code disagreed about the default
2) new GUCs were missing from postgresql.conf.sample
3) Outdated source-code comment about bgwriter_flush_after's default
4) Sub-optimal categories assigned to new GUCs
5) Docs suggested backend_flush_after is PGC_SIGHUP, but it's PGC_USERSET.
6) Spell out int as integer in the docs, as done elsewhere
Reported-By: Magnus Hagander, Fujii Masao
Discussion: CAHGQGwETyTG5VYQQ5C_srwxWX7RXvFcD3dKROhvAWWhoSBdmZw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/misc/guc.c | 50 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 6 |
2 files changed, 31 insertions, 25 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index fb091bc4a0b..60856dda198 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2274,6 +2274,18 @@ static struct config_int ConfigureNamesInt[] = }, { + {"checkpoint_flush_after", PGC_SIGHUP, WAL_CHECKPOINTS, + gettext_noop("Number of pages after which previously performed writes are flushed to disk."), + NULL, + GUC_UNIT_BLOCKS + }, + &checkpoint_flush_after, + /* see bufmgr.h: OS dependent default */ + DEFAULT_CHECKPOINT_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES, + NULL, NULL, NULL + }, + + { {"wal_buffers", PGC_POSTMASTER, WAL_SETTINGS, gettext_noop("Sets the number of disk-page buffers in shared memory for WAL."), NULL, @@ -2420,6 +2432,18 @@ static struct config_int ConfigureNamesInt[] = }, { + {"bgwriter_flush_after", PGC_SIGHUP, RESOURCES_BGWRITER, + gettext_noop("Number of pages after which previously performed writes are flushed to disk."), + NULL, + GUC_UNIT_BLOCKS + }, + &bgwriter_flush_after, + /* see bufmgr.h: OS dependent default */ + DEFAULT_BGWRITER_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES, + NULL, NULL, NULL + }, + + { {"effective_io_concurrency", PGC_USERSET, RESOURCES_ASYNCHRONOUS, @@ -2436,19 +2460,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"checkpoint_flush_after", PGC_SIGHUP, RESOURCES_ASYNCHRONOUS, - gettext_noop("Number of pages after which previously performed writes are flushed to disk."), - NULL, - GUC_UNIT_BLOCKS - }, - &checkpoint_flush_after, - /* see bufmgr.h: OS dependent default */ - DEFAULT_CHECKPOINT_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES, - NULL, NULL, NULL - }, - - { - {"backend_flush_after", PGC_USERSET, WAL_CHECKPOINTS, + {"backend_flush_after", PGC_USERSET, RESOURCES_ASYNCHRONOUS, gettext_noop("Number of pages after which previously performed writes are flushed to disk."), NULL, GUC_UNIT_BLOCKS @@ -2460,18 +2472,6 @@ static struct config_int ConfigureNamesInt[] = }, { - {"bgwriter_flush_after", PGC_SIGHUP, WAL_CHECKPOINTS, - gettext_noop("Number of pages after which previously performed writes are flushed to disk."), - NULL, - GUC_UNIT_BLOCKS - }, - &bgwriter_flush_after, - /* see bufmgr.h: 16 on Linux, 0 otherwise */ - DEFAULT_BGWRITER_FLUSH_AFTER, 0, WRITEBACK_MAX_PENDING_FLUSHES, - NULL, NULL, NULL - }, - - { {"max_worker_processes", PGC_POSTMASTER, RESOURCES_ASYNCHRONOUS, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index d4dd285ef0a..14b537ffb17 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -160,6 +160,8 @@ #bgwriter_delay = 200ms # 10-10000ms between rounds #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round +#bgwriter_flush_after = 0 # 0 disables, + # default is 512kb on linux, 0 otherwise # - Asynchronous Behavior - @@ -168,6 +170,8 @@ #max_parallel_degree = 0 # max number of worker processes per node #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate # (change requires restart) +#backend_flush_after = 0 # 0 disables, + # default is 128kb on linux, 0 otherwise #------------------------------------------------------------------------------ @@ -206,6 +210,8 @@ #max_wal_size = 1GB #min_wal_size = 80MB #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 +#checkpoint_flush_after = 0 # 0 disables, + # default is 256kb on linux, 0 otherwise #checkpoint_warning = 30s # 0 disables # - Archiving - |