On 03/02/2015 03:43 PM, Andres Freund wrote:
> Hi,
> 
> On 2015-03-02 15:40:27 -0800, Josh Berkus wrote:
>> ! #max_wal_size = 1GB                        # in logfile segments
> 
> Independent of the rest of the changes, the "in logfile segments" bit
> should probably be changed.

Point!  Although I think it's fair to point out that that wasn't my
omission, but Heikki's.

Version C, with that correction, attached.

-- 
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..d3ef3e9
*** 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
  #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

Reply via email to