On 03/02/2015 03:18 PM, Josh Berkus wrote: > Attached. > > Per discussion on the thread "Redesigning checkpoint_segments" this > raises the default for the new parameter "max_wal_size" to 1GB. > > Seems too small to add it to the CF, but if you want me to, I will.
Ooops, patch didn't include the docs update for some reason. Fixed. Also, link to relevant post: http://www.postgresql.org/message-id/54f4ef49.1010...@agliodbs.com -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml new file mode 100644 index 9261e7f..26214ec *** a/doc/src/sgml/config.sgml --- b/doc/src/sgml/config.sgml *************** include_dir 'conf.d' *** 2406,2412 **** checkpoints. This is a soft limit; WAL size can exceed <varname>max_wal_size</> under special circumstances, like under heavy load, a failing <varname>archive_command</>, or a high ! <varname>wal_keep_segments</> setting. The default is 128 MB. Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the <filename>postgresql.conf</> --- 2406,2412 ---- checkpoints. This is a soft limit; WAL size can exceed <varname>max_wal_size</> under special circumstances, like under heavy load, a failing <varname>archive_command</>, or a high ! <varname>wal_keep_segments</> setting. The default is 1 GB. Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the <filename>postgresql.conf</> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c new file mode 100644 index d84dba7..cc4654a *** a/src/backend/utils/misc/guc.c --- b/src/backend/utils/misc/guc.c *************** static struct config_int ConfigureNamesI *** 2171,2177 **** GUC_UNIT_XSEGS }, &max_wal_size, ! 8, 2, INT_MAX, NULL, assign_max_wal_size, NULL }, --- 2171,2177 ---- GUC_UNIT_XSEGS }, &max_wal_size, ! 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 new file mode 100644 index f8f9ce1..b4bc29a *** a/src/backend/utils/misc/postgresql.conf.sample --- b/src/backend/utils/misc/postgresql.conf.sample *************** *** 198,204 **** # - Checkpoints - #checkpoint_timeout = 5min # range 30s-1h ! #max_wal_size = 128MB # in logfile segments #min_wal_size = 80MB #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 #checkpoint_warning = 30s # 0 disables --- 198,204 ---- # - Checkpoints - #checkpoint_timeout = 5min # range 30s-1h ! #max_wal_size = 1GB # in logfile segments #min_wal_size = 80MB #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 #checkpoint_warning = 30s # 0 disables
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers