diff options
author | Andres Freund <andres@anarazel.de> | 2015-03-15 17:37:07 +0100 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-03-15 17:37:07 +0100 |
commit | a0f5954af19ddcfea946b15744f2006a789dc4bd (patch) | |
tree | f1804d6c5e464c1c22c1022dc7525b896fac1071 /src | |
parent | 241f088f3632814fe9dbd5bcbc509ec42a268d01 (diff) | |
download | postgresql-a0f5954af19ddcfea946b15744f2006a789dc4bd.tar.gz postgresql-a0f5954af19ddcfea946b15744f2006a789dc4bd.zip |
Increase max_wal_size's default from 128MB to 1GB.
The introduction of min_wal_size & max_wal_size in 88e982302684 makes it
feasible to increase the default upper bound in checkpoint
size. Previously raising the default would lead to a increased disk
footprint, even if more segments weren't beneficial. The low default of
checkpoint size is one of common performance problem users have thus
increasing the default makes sense. Setups where the increase in
maximum disk usage is a problem will very likely have to run with a
modified configuration anyway.
Discussion: 54F4EFB8.40202@agliodbs.com,
CA+TgmoZEAgX5oMGJOHVj8L7XOkAe05Gnf45rP40m-K3FhZRVKg@mail.gmail.com
Author: Josh Berkus, after a discussion involving lots of people.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/transam/xlog.c | 2 | ||||
-rw-r--r-- | src/backend/utils/misc/guc.c | 2 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 17bd5d85a95..72af2c43303 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -79,7 +79,7 @@ extern uint32 bootstrap_data_checksum_version; /* User-settable parameters */ -int max_wal_size = 8; /* 128 MB */ +int max_wal_size = 64; /* 1 GB */ int min_wal_size = 5; /* 80 MB */ int wal_keep_segments = 0; int XLOGbuffers = -1; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 7196b0b2157..26275bda129 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2191,7 +2191,7 @@ static struct config_int ConfigureNamesInt[] = GUC_UNIT_XSEGS }, &max_wal_size, - 8, 2, INT_MAX, + 64, 2, INT_MAX, NULL, assign_max_wal_size, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index d7a61f1fc4b..110983f1764 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -199,7 +199,7 @@ # - Checkpoints - #checkpoint_timeout = 5min # range 30s-1h -#max_wal_size = 128MB # in logfile segments +#max_wal_size = 1GB #min_wal_size = 80MB #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 #checkpoint_warning = 30s # 0 disables |