Remove confusing commented-defaullts from postgresql.conf - Mailing list pgsql-patches

From Greg Sabino Mullane
Subject Remove confusing commented-defaullts from postgresql.conf
Date
Msg-id 04a82ef0a7548e55c9e84464c300c25d@biglumber.com
Whole thread Raw
Responses Re: Remove confusing commented-defaullts from postgresql.conf  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


I know we never reached a full consensus on hackers about the
full solution to the postgresql.conf file, but I think everyone
agreed that having commented-out "default" values was a bad thing,
which caused confusion among even seasoned pg people. Thus, the
patch below which simply removes the starting '#' from all settings.
Forgive the lack of -c to the diff: I figured saving space was
more important as the context is not needed in this case.

--
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200407122051




Index: postgresql.conf.sample
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.115
diff -r1.115 postgresql.conf.sample
5c5
< # This file consists of lines of the form:
---
> # This file consists of lines of the form: GREG
11,12c11
< # allowed values can be found in the PostgreSQL documentation. The
< # commented-out settings shown in this file represent the default values.
---
> # allowed values can be found in the PostgreSQL documentation.
28,31c27,30
< # pgdata = '/usr/local/pgsql/data'        # use data in another directory
< # hba_conf = '/etc/pgsql/pg_hba.conf'         # use hba info in another directory
< # ident_conf = '/etc/pgsql/pg_ident.conf'    # use ident info in another directory
< # external_pidfile= '/var/run/postgresql.pid'    # write an extra pid file
---
> pgdata = '/usr/local/pgsql/data'        # use data in another directory
> hba_conf = '/etc/pgsql/pg_hba.conf'         # use hba info in another directory
> ident_conf = '/etc/pgsql/pg_ident.conf'    # use ident info in another directory
> external_pidfile= '/var/run/postgresql.pid'    # write an extra pid file
40c39
< #listen_addresses = 'localhost'    # what IP interface(s) to listen on;
---
> listen_addresses = 'localhost'    # what IP interface(s) to listen on;
42,43c41,42
< #port = 5432
< #max_connections = 100
---
> port = 5432
> max_connections = 100
47,51c46,50
< #superuser_reserved_connections = 2
< #unix_socket_directory = ''
< #unix_socket_group = ''
< #unix_socket_permissions = 0777    # octal
< #rendezvous_name = ''        # defaults to the computer name
---
> superuser_reserved_connections = 2
> unix_socket_directory = ''
> unix_socket_group = ''
> unix_socket_permissions = 0777    # octal
> rendezvous_name = ''        # defaults to the computer name
55,59c54,58
< #authentication_timeout = 60    # 1-600, in seconds
< #ssl = false
< #password_encryption = true
< #krb_server_keyfile = ''
< #db_user_namespace = false
---
> authentication_timeout = 60    # 1-600, in seconds
> ssl = false
> password_encryption = true
> krb_server_keyfile = ''
> db_user_namespace = false
68,77c67,76
< #shared_buffers = 1000        # min 16, at least max_connections*2, 8KB each
< #work_mem = 1024        # min 64, size in KB
< #maintenance_work_mem = 16384    # min 1024, size in KB
< #max_stack_depth = 2048        # min 100, size in KB
<
< #vacuum_cost_page_hit = 1    # 0-10000 credits
< #vacuum_cost_page_miss = 10    # 0-10000 credits
< #vacuum_cost_page_dirty = 20    # 0-10000 credits
< #vacuum_cost_limit = 200    # 0-10000 credits
< #vacuum_cost_naptime = 50    # 0-1000 milliseconds
---
> shared_buffers = 1000        # min 16, at least max_connections*2, 8KB each
> work_mem = 1024        # min 64, size in KB
> maintenance_work_mem = 16384    # min 1024, size in KB
> max_stack_depth = 2048        # min 100, size in KB
>
> vacuum_cost_page_hit = 1    # 0-10000 credits
> vacuum_cost_page_miss = 10    # 0-10000 credits
> vacuum_cost_page_dirty = 20    # 0-10000 credits
> vacuum_cost_limit = 200    # 0-10000 credits
> vacuum_cost_naptime = 50    # 0-1000 milliseconds
80,82c79,81
< #bgwriter_delay = 200        # 10-5000 milliseconds
< #bgwriter_percent = 1        # 0-100% of dirty buffers
< #bgwriter_maxpages = 100    # 1-1000 buffers max at once
---
> bgwriter_delay = 200        # 10-5000 milliseconds
> bgwriter_percent = 1        # 0-100% of dirty buffers
> bgwriter_maxpages = 100    # 1-1000 buffers max at once
86,87c85,86
< #max_fsm_pages = 20000        # min max_fsm_relations*16, 6 bytes each
< #max_fsm_relations = 1000    # min 100, ~50 bytes each
---
> max_fsm_pages = 20000        # min max_fsm_relations*16, 6 bytes each
> max_fsm_relations = 1000    # min 100, ~50 bytes each
91,92c90,91
< #max_files_per_process = 1000    # min 25
< #preload_libraries = ''
---
> max_files_per_process = 1000    # min 25
> preload_libraries = ''
101,102c100,101
< #fsync = true            # turns forced synchronization on or off
< #wal_sync_method = fsync    # the default varies across platforms:
---
> fsync = true            # turns forced synchronization on or off
> wal_sync_method = fsync    # the default varies across platforms:
104c103
< #wal_buffers = 8        # min 4, 8KB each
---
> wal_buffers = 8        # min 4, 8KB each
108,112c107,111
< #checkpoint_segments = 3    # in logfile segments, min 1, 16MB each
< #checkpoint_timeout = 300    # range 30-3600, in seconds
< #checkpoint_warning = 30    # 0 is off, in seconds
< #commit_delay = 0        # range 0-100000, in microseconds
< #commit_siblings = 5        # range 1-1000
---
> checkpoint_segments = 3    # in logfile segments, min 1, 16MB each
> checkpoint_timeout = 300    # range 30-3600, in seconds
> checkpoint_warning = 30    # 0 is off, in seconds
> commit_delay = 0        # range 0-100000, in microseconds
> commit_siblings = 5        # range 1-1000
121,128c120,127
< #enable_hashagg = true
< #enable_hashjoin = true
< #enable_indexscan = true
< #enable_mergejoin = true
< #enable_nestloop = true
< #enable_seqscan = true
< #enable_sort = true
< #enable_tidscan = true
---
> enable_hashagg = true
> enable_hashjoin = true
> enable_indexscan = true
> enable_mergejoin = true
> enable_nestloop = true
> enable_seqscan = true
> enable_sort = true
> enable_tidscan = true
132,136c131,135
< #effective_cache_size = 1000    # typically 8KB each
< #random_page_cost = 4        # units are one sequential page fetch cost
< #cpu_tuple_cost = 0.01        # (same)
< #cpu_index_tuple_cost = 0.001    # (same)
< #cpu_operator_cost = 0.0025    # (same)
---
> effective_cache_size = 1000    # typically 8KB each
> random_page_cost = 4        # units are one sequential page fetch cost
> cpu_tuple_cost = 0.01        # (same)
> cpu_index_tuple_cost = 0.001    # (same)
> cpu_operator_cost = 0.0025    # (same)
140,145c139,144
< #geqo = true
< #geqo_threshold = 12
< #geqo_effort = 5        # range 1-10
< #geqo_pool_size = 0        # selects default based on effort
< #geqo_generations = 0        # selects default based on effort
< #geqo_selection_bias = 2.0    # range 1.5-2.0
---
> geqo = true
> geqo_threshold = 12
> geqo_effort = 5        # range 1-10
> geqo_pool_size = 0        # selects default based on effort
> geqo_generations = 0        # selects default based on effort
> geqo_selection_bias = 2.0    # range 1.5-2.0
149,151c148,150
< #default_statistics_target = 10    # range 1-1000
< #from_collapse_limit = 8
< #join_collapse_limit = 8    # 1 disables collapsing of explicit JOINs
---
> default_statistics_target = 10    # range 1-1000
> from_collapse_limit = 8
> join_collapse_limit = 8    # 1 disables collapsing of explicit JOINs
160c159
< #log_destination = 'stderr'    # Valid values are combinations of stderr,
---
> log_destination = 'stderr'    # Valid values are combinations of stderr,
163,164c162,163
< #syslog_facility = 'LOCAL0'
< #syslog_ident = 'postgres'
---
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'
168c167
< #client_min_messages = notice    # Values, in order of decreasing detail:
---
> client_min_messages = notice    # Values, in order of decreasing detail:
172c171
< #log_min_messages = notice    # Values, in order of decreasing detail:
---
> log_min_messages = notice    # Values, in order of decreasing detail:
177c176
< #log_error_verbosity = default    # terse, default, or verbose messages
---
> log_error_verbosity = default    # terse, default, or verbose messages
179c178
< #log_min_error_statement = panic # Values in order of increasing severity:
---
> log_min_error_statement = panic # Values in order of increasing severity:
183c182
< #log_min_duration_statement = -1 # -1 is disabled, in milliseconds.
---
> log_min_duration_statement = -1 # -1 is disabled, in milliseconds.
185c184
< #silent_mode = false         # DO NOT USE without Syslog!
---
> silent_mode = false         # DO NOT USE without Syslog!
189,196c188,195
< #debug_print_parse = false
< #debug_print_rewritten = false
< #debug_print_plan = false
< #debug_pretty_print = false
< #log_connections = false
< #log_disconnections = false
< #log_duration = false
< #log_line_prefix = ''        # e.g. '<%u%%%d> '
---
> debug_print_parse = false
> debug_print_rewritten = false
> debug_print_plan = false
> debug_pretty_print = false
> log_connections = false
> log_disconnections = false
> log_duration = false
> log_line_prefix = ''        # e.g. '<%u%%%d> '
204,205c203,204
< #log_statement = 'none'        # none, mod, ddl, all
< #log_hostname = false
---
> log_statement = 'none'        # none, mod, ddl, all
> log_hostname = false
214,217c213,216
< #log_parser_stats = false
< #log_planner_stats = false
< #log_executor_stats = false
< #log_statement_stats = false
---
> log_parser_stats = false
> log_planner_stats = false
> log_executor_stats = false
> log_statement_stats = false
219c218
< #debug_shared_buffers = 0    # 0-600 seconds
---
> debug_shared_buffers = 0    # 0-600 seconds
223,227c222,226
< #stats_start_collector = true
< #stats_command_string = false
< #stats_block_level = false
< #stats_row_level = false
< #stats_reset_on_server_start = true
---
> stats_start_collector = true
> stats_command_string = false
> stats_block_level = false
> stats_row_level = false
> stats_reset_on_server_start = true
236,240c235,239
< #search_path = '$user,public'    # schema names
< #check_function_bodies = true
< #default_transaction_isolation = 'read committed'
< #default_transaction_read_only = false
< #statement_timeout = 0        # 0 is disabled, in milliseconds
---
> search_path = '$user,public'    # schema names
> check_function_bodies = true
> default_transaction_isolation = 'read committed'
> default_transaction_read_only = false
> statement_timeout = 0        # 0 is disabled, in milliseconds
244,248c243,247
< #datestyle = 'iso, mdy'
< #timezone = unknown        # actually, defaults to TZ environment setting
< #australian_timezones = false
< #extra_float_digits = 0        # min -15, max 2
< #client_encoding = sql_ascii    # actually, defaults to database encoding
---
> datestyle = 'iso, mdy'
> timezone = unknown        # actually, defaults to TZ environment setting
> australian_timezones = false
> extra_float_digits = 0        # min -15, max 2
> client_encoding = sql_ascii    # actually, defaults to database encoding
251,254c250,253
< #lc_messages = 'C'        # locale for system error message strings
< #lc_monetary = 'C'        # locale for monetary formatting
< #lc_numeric = 'C'        # locale for number formatting
< #lc_time = 'C'            # locale for time formatting
---
> lc_messages = 'C'        # locale for system error message strings
> lc_monetary = 'C'        # locale for monetary formatting
> lc_numeric = 'C'        # locale for number formatting
> lc_time = 'C'            # locale for time formatting
258,259c257,258
< #explain_pretty_print = true
< #dynamic_library_path = '$libdir'
---
> explain_pretty_print = true
> dynamic_library_path = '$libdir'
266,267c265,266
< #deadlock_timeout = 1000    # in milliseconds
< #max_locks_per_transaction = 64    # min 10, ~260*max_connections bytes each
---
> deadlock_timeout = 1000    # in milliseconds
> max_locks_per_transaction = 64    # min 10, ~260*max_connections bytes each
276,279c275,278
< #add_missing_from = true
< #regex_flavor = advanced    # advanced, extended, or basic
< #sql_inheritance = true
< #default_with_oids = true
---
> add_missing_from = true
> regex_flavor = advanced    # advanced, extended, or basic
> sql_inheritance = true
> default_with_oids = true
283c282,283
< #transform_null_equals = false
---
> transform_null_equals = false
>






-----BEGIN PGP SIGNATURE-----

iD8DBQFA8zJpvJuQZxSWSsgRAqZfAJ9lqog0A7CRgc+5h+qgavIAcSBWPQCfbrFj
gVEvRUYFY4BworLIukHm+s8=
=U5Nl
-----END PGP SIGNATURE-----



pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Include tablespace information in psql \d footers
Next
From: Bruce Momjian
Date:
Subject: Re: Include tablespace information in psql \d footers