Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8f91d87

Browse files
committed
Fix documentation & config inconsistencies around428b1d6.
Several issues:1) checkpoint_flush_after doc and code disagreed about the default2) new GUCs were missing from postgresql.conf.sample3) Outdated source-code comment about bgwriter_flush_after's default4) Sub-optimal categories assigned to new GUCs5) Docs suggested backend_flush_after is PGC_SIGHUP, but it's PGC_USERSET.6) Spell out int as integer in the docs, as done elsewhereReported-By: Magnus Hagander, Fujii MasaoDiscussion: CAHGQGwETyTG5VYQQ5C_srwxWX7RXvFcD3dKROhvAWWhoSBdmZw@mail.gmail.com
1 parent0ab3595 commit8f91d87

File tree

3 files changed

+35
-31
lines changed

3 files changed

+35
-31
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ include_dir 'conf.d'
18841884
</varlistentry>
18851885

18861886
<varlistentry id="guc-bgwriter-flush-after" xreflabel="bgwriter_flush_after">
1887-
<term><varname>bgwriter_flush_after</varname> (<type>int</type>)
1887+
<term><varname>bgwriter_flush_after</varname> (<type>integer</type>)
18881888
<indexterm>
18891889
<primary><varname>bgwriter_flush_after</> configuration parameter</primary>
18901890
</indexterm>
@@ -2014,7 +2014,7 @@ include_dir 'conf.d'
20142014
</varlistentry>
20152015

20162016
<varlistentry id="guc-backend-flush-after" xreflabel="backend_flush_after">
2017-
<term><varname>backend_flush_after</varname> (<type>int</type>)
2017+
<term><varname>backend_flush_after</varname> (<type>integer</type>)
20182018
<indexterm>
20192019
<primary><varname>backend_flush_after</> configuration parameter</primary>
20202020
</indexterm>
@@ -2036,8 +2036,6 @@ include_dir 'conf.d'
20362036
and <literal>2MB</literal>. The default is <literal>128Kb</> on
20372037
Linux, <literal>0</> elsewhere. (Non-default values of
20382038
<symbol>BLCKSZ</symbol> change the default and maximum.)
2039-
This parameter can only be set in the <filename>postgresql.conf</>
2040-
file or on the server command line.
20412039
</para>
20422040
</listitem>
20432041
</varlistentry>
@@ -2607,7 +2605,7 @@ include_dir 'conf.d'
26072605
</varlistentry>
26082606

26092607
<varlistentry id="guc-checkpoint-flush-after" xreflabel="checkpoint_flush_after">
2610-
<term><varname>checkpoint_flush_after</varname> (<type>int</type>)
2608+
<term><varname>checkpoint_flush_after</varname> (<type>integer</type>)
26112609
<indexterm>
26122610
<primary><varname>checkpoint_flush_after</> configuration parameter</primary>
26132611
</indexterm>
@@ -2626,7 +2624,7 @@ include_dir 'conf.d'
26262624
than the OS's page cache, where performance might degrade. This
26272625
setting may have no effect on some platforms. The valid range is
26282626
between <literal>0</literal>, which disables controlled writeback,
2629-
and <literal>2MB</literal>. The default is <literal>128Kb</> on
2627+
and <literal>2MB</literal>. The default is <literal>256Kb</> on
26302628
Linux, <literal>0</> elsewhere. (Non-default values of
26312629
<symbol>BLCKSZ</symbol> change the default and maximum.)
26322630
This parameter can only be set in the <filename>postgresql.conf</>

‎src/backend/utils/misc/guc.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,6 +2273,18 @@ static struct config_int ConfigureNamesInt[] =
22732273
NULL,NULL,NULL
22742274
},
22752275

2276+
{
2277+
{"checkpoint_flush_after",PGC_SIGHUP,WAL_CHECKPOINTS,
2278+
gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
2279+
NULL,
2280+
GUC_UNIT_BLOCKS
2281+
},
2282+
&checkpoint_flush_after,
2283+
/* see bufmgr.h: OS dependent default */
2284+
DEFAULT_CHECKPOINT_FLUSH_AFTER,0,WRITEBACK_MAX_PENDING_FLUSHES,
2285+
NULL,NULL,NULL
2286+
},
2287+
22762288
{
22772289
{"wal_buffers",PGC_POSTMASTER,WAL_SETTINGS,
22782290
gettext_noop("Sets the number of disk-page buffers in shared memory for WAL."),
@@ -2419,6 +2431,18 @@ static struct config_int ConfigureNamesInt[] =
24192431
NULL,NULL,NULL
24202432
},
24212433

2434+
{
2435+
{"bgwriter_flush_after",PGC_SIGHUP,RESOURCES_BGWRITER,
2436+
gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
2437+
NULL,
2438+
GUC_UNIT_BLOCKS
2439+
},
2440+
&bgwriter_flush_after,
2441+
/* see bufmgr.h: OS dependent default */
2442+
DEFAULT_BGWRITER_FLUSH_AFTER,0,WRITEBACK_MAX_PENDING_FLUSHES,
2443+
NULL,NULL,NULL
2444+
},
2445+
24222446
{
24232447
{"effective_io_concurrency",
24242448
PGC_USERSET,
@@ -2436,19 +2460,7 @@ static struct config_int ConfigureNamesInt[] =
24362460
},
24372461

24382462
{
2439-
{"checkpoint_flush_after",PGC_SIGHUP,RESOURCES_ASYNCHRONOUS,
2440-
gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
2441-
NULL,
2442-
GUC_UNIT_BLOCKS
2443-
},
2444-
&checkpoint_flush_after,
2445-
/* see bufmgr.h: OS dependent default */
2446-
DEFAULT_CHECKPOINT_FLUSH_AFTER,0,WRITEBACK_MAX_PENDING_FLUSHES,
2447-
NULL,NULL,NULL
2448-
},
2449-
2450-
{
2451-
{"backend_flush_after",PGC_USERSET,WAL_CHECKPOINTS,
2463+
{"backend_flush_after",PGC_USERSET,RESOURCES_ASYNCHRONOUS,
24522464
gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
24532465
NULL,
24542466
GUC_UNIT_BLOCKS
@@ -2459,18 +2471,6 @@ static struct config_int ConfigureNamesInt[] =
24592471
NULL,NULL,NULL
24602472
},
24612473

2462-
{
2463-
{"bgwriter_flush_after",PGC_SIGHUP,WAL_CHECKPOINTS,
2464-
gettext_noop("Number of pages after which previously performed writes are flushed to disk."),
2465-
NULL,
2466-
GUC_UNIT_BLOCKS
2467-
},
2468-
&bgwriter_flush_after,
2469-
/* see bufmgr.h: 16 on Linux, 0 otherwise */
2470-
DEFAULT_BGWRITER_FLUSH_AFTER,0,WRITEBACK_MAX_PENDING_FLUSHES,
2471-
NULL,NULL,NULL
2472-
},
2473-
24742474
{
24752475
{"max_worker_processes",
24762476
PGC_POSTMASTER,

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@
160160
#bgwriter_delay = 200ms# 10-10000ms between rounds
161161
#bgwriter_lru_maxpages = 100# 0-1000 max buffers written/round
162162
#bgwriter_lru_multiplier = 2.0# 0-10.0 multiplier on buffers scanned/round
163+
#bgwriter_flush_after = 0# 0 disables,
164+
# default is 512kb on linux, 0 otherwise
163165

164166
# - Asynchronous Behavior -
165167

@@ -168,6 +170,8 @@
168170
#max_parallel_degree = 0# max number of worker processes per node
169171
#old_snapshot_threshold = -1# 1min-60d; -1 disables; 0 is immediate
170172
# (change requires restart)
173+
#backend_flush_after = 0# 0 disables,
174+
# default is 128kb on linux, 0 otherwise
171175

172176

173177
#------------------------------------------------------------------------------
@@ -206,6 +210,8 @@
206210
#max_wal_size = 1GB
207211
#min_wal_size = 80MB
208212
#checkpoint_completion_target = 0.5# checkpoint target duration, 0.0 - 1.0
213+
#checkpoint_flush_after = 0# 0 disables,
214+
# default is 256kb on linux, 0 otherwise
209215
#checkpoint_warning = 30s# 0 disables
210216

211217
# - Archiving -

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp