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

Commita0f5954

Browse files
committed
Increase max_wal_size's default from 128MB to 1GB.
The introduction of min_wal_size & max_wal_size in88e9823 makes itfeasible to increase the default upper bound in checkpointsize. Previously raising the default would lead to a increased diskfootprint, even if more segments weren't beneficial. The low default ofcheckpoint size is one of common performance problem users have thusincreasing the default makes sense. Setups where the increase inmaximum disk usage is a problem will very likely have to run with amodified configuration anyway.Discussion: 54F4EFB8.40202@agliodbs.com, CA+TgmoZEAgX5oMGJOHVj8L7XOkAe05Gnf45rP40m-K3FhZRVKg@mail.gmail.comAuthor: Josh Berkus, after a discussion involving lots of people.
1 parent241f088 commita0f5954

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ include_dir 'conf.d'
24302430
checkpoints. This is a soft limit; WAL size can exceed
24312431
<varname>max_wal_size</> under special circumstances, like
24322432
under heavy load, a failing <varname>archive_command</>, or a high
2433-
<varname>wal_keep_segments</> setting. The default is128 MB.
2433+
<varname>wal_keep_segments</> setting. The default is1 GB.
24342434
Increasing this parameter can increase the amount of time needed for
24352435
crash recovery.
24362436
This parameter can only be set in the <filename>postgresql.conf</>

‎doc/src/sgml/wal.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@
475475
linkend="guc-checkpoint-timeout"> seconds, or if
476476
<xref linkend="guc-max-wal-size"> is about to be exceeded,
477477
whichever comes first.
478-
The default settings are 5 minutes and128 MB, respectively.
478+
The default settings are 5 minutes and1 GB, respectively.
479479
If no WAL has been written since the previous checkpoint, new checkpoints
480480
will be skipped even if <varname>checkpoint_timeout</> has passed.
481481
(If WAL archiving is being used and you want to put a lower limit on how

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ extern uint32 bootstrap_data_checksum_version;
7979

8080

8181
/* User-settable parameters */
82-
intmax_wal_size=8;/*128 MB */
82+
intmax_wal_size=64;/*1 GB */
8383
intmin_wal_size=5;/* 80 MB */
8484
intwal_keep_segments=0;
8585
intXLOGbuffers=-1;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,7 @@ static struct config_int ConfigureNamesInt[] =
21912191
GUC_UNIT_XSEGS
21922192
},
21932193
&max_wal_size,
2194-
8,2,INT_MAX,
2194+
64,2,INT_MAX,
21952195
NULL,assign_max_wal_size,NULL
21962196
},
21972197

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
# - Checkpoints -
200200

201201
#checkpoint_timeout = 5min# range 30s-1h
202-
#max_wal_size =128MB# in logfile segments
202+
#max_wal_size =1GB
203203
#min_wal_size = 80MB
204204
#checkpoint_completion_target = 0.5# checkpoint target duration, 0.0 - 1.0
205205
#checkpoint_warning = 30s# 0 disables

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp