Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 90c07a7

Browse files
committed
Add units to the default postgresql.conf. For the most part, this should
match what SHOW displays as default value, to make the user experience uniform.
1 parent ceefbbf commit 90c07a7

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

src/backend/utils/misc/guc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.350 2006/09/02 23:12:16 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.351 2006/09/22 17:41:21 petere Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1404,7 +1404,8 @@ static struct config_int ConfigureNamesInt[] =
14041404
"frequently than this (in seconds)."),
14051405
gettext_noop("Write a message to the server log if checkpoints "
14061406
"caused by the filling of checkpoint segment files happens more "
1407-
"frequently than this number of seconds. Zero turns off the warning.")
1407+
"frequently than this number of seconds. Zero turns off the warning."),
1408+
GUC_UNIT_S
14081409
},
14091410
&CheckPointWarning,
14101411
30, 0, INT_MAX, NULL, NULL

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
# - Security & Authentication -
7171

72-
#authentication_timeout = 60 # 1-600, in seconds
72+
#authentication_timeout = 1min # 1s-600s
7373
#ssl = off # (change requires restart)
7474
#password_encryption = on
7575
#db_user_namespace = off
@@ -98,16 +98,16 @@
9898

9999
# - Memory -
100100

101-
#shared_buffers = 32000kB # min 16 or max_connections*2, 8kB each
101+
#shared_buffers = 32000kB # min 128kB or max_connections*16kB
102102
# (change requires restart)
103-
#temp_buffers = 1000 # min 100, 8kB each
103+
#temp_buffers = 8000kB # min 800kB
104104
#max_prepared_transactions = 5 # can be 0 or more
105105
# (change requires restart)
106106
# Note: increasing max_prepared_transactions costs ~600 bytes of shared memory
107107
# per transaction slot, plus lock space (see max_locks_per_transaction).
108-
#work_mem = 1024 # min 64, size in kB
109-
#maintenance_work_mem = 16384 # min 1024, size in kB
110-
#max_stack_depth = 2048 # min 100, size in kB
108+
#work_mem = 1MB # min 64kB
109+
#maintenance_work_mem = 16MB # min 1MB
110+
#max_stack_depth = 2MB # min 100kB
111111

112112
# - Free Space Map -
113113

@@ -132,7 +132,7 @@
132132

133133
# - Background writer -
134134

135-
#bgwriter_delay = 200 # 10-10000 milliseconds between rounds
135+
#bgwriter_delay = 200ms # 10-10000ms between rounds
136136
#bgwriter_lru_percent = 1.0 # 0-100% of LRU buffers scanned/round
137137
#bgwriter_lru_maxpages = 5 # 0-1000 buffers max written/round
138138
#bgwriter_all_percent = 0.333 # 0-100% of all buffers scanned/round
@@ -162,8 +162,8 @@
162162
# - Checkpoints -
163163

164164
#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
165-
#checkpoint_timeout = 300 # range 30-3600, in seconds
166-
#checkpoint_warning = 30 # in seconds, 0 is off
165+
#checkpoint_timeout = 5min # range 30s-1h
166+
#checkpoint_warning = 30s # 0 is off
167167

168168
# - Archiving -
169169

@@ -195,7 +195,7 @@
195195
#cpu_tuple_cost = 0.01 # same scale as above
196196
#cpu_index_tuple_cost = 0.005 # same scale as above
197197
#cpu_operator_cost = 0.0025 # same scale as above
198-
#effective_cache_size = 1000 # typically 8kB each
198+
#effective_cache_size = 8000kB
199199

200200
# - Genetic Query Optimizer -
201201

@@ -243,11 +243,11 @@
243243
# or size-driven rotation. Default is
244244
# off, meaning append to existing files
245245
# in all cases.
246-
#log_rotation_age = 1440 # Automatic rotation of logfiles will
247-
# happen after so many minutes. 0 to
246+
#log_rotation_age = 1d # Automatic rotation of logfiles will
247+
# happen after that time. 0 to
248248
# disable.
249-
#log_rotation_size = 10240 # Automatic rotation of logfiles will
250-
# happen after so many kilobytes of log
249+
#log_rotation_size = 10MB # Automatic rotation of logfiles will
250+
# happen after that much log
251251
# output. 0 to disable.
252252

253253
# These are relevant when logging to syslog:
@@ -297,7 +297,7 @@
297297
# panic(off)
298298

299299
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
300-
# and their durations, in milliseconds.
300+
# and their durations.
301301

302302
#silent_mode = off # DO NOT USE without syslog or
303303
# redirect_stderr
@@ -362,7 +362,7 @@
362362
#---------------------------------------------------------------------------
363363

364364
#autovacuum = off # enable autovacuum subprocess?
365-
#autovacuum_naptime = 60 # time between autovacuum runs, in secs
365+
#autovacuum_naptime = 1min # time between autovacuum runs
366366
#autovacuum_vacuum_threshold = 500 # min # of tuple updates before
367367
# vacuum
368368
#autovacuum_analyze_threshold = 250 # min # of tuple updates before
@@ -372,10 +372,10 @@
372372
#autovacuum_analyze_scale_factor = 0.1 # fraction of rel size before
373373
# analyze
374374
#autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
375-
# autovac, -1 means use
375+
# autovacuum, -1 means use
376376
# vacuum_cost_delay
377377
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
378-
# autovac, -1 means use
378+
# autovacuum, -1 means use
379379
# vacuum_cost_limit
380380

381381

@@ -391,7 +391,7 @@
391391
#check_function_bodies = on
392392
#default_transaction_isolation = 'read committed'
393393
#default_transaction_read_only = off
394-
#statement_timeout = 0 # 0 is disabled, in milliseconds
394+
#statement_timeout = 0 # 0 is disabled
395395

396396
# - Locale and Formatting -
397397

@@ -427,7 +427,7 @@
427427
# LOCK MANAGEMENT
428428
#---------------------------------------------------------------------------
429429

430-
#deadlock_timeout = 1000 # in milliseconds
430+
#deadlock_timeout = 1s
431431
#max_locks_per_transaction = 64 # min 10
432432
# (change requires restart)
433433
# Note: each lock table slot uses ~270 bytes of shared memory, and there are

0 commit comments

Comments
 (0)