postgresql.conf.sample 20.3 KB
Newer Older
1
# -----------------------------
2 3 4
# PostgreSQL configuration file
# -----------------------------
#
5
# This file consists of lines of the form:
6 7 8
#
#   name = value
#
9 10 11
# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
# "#" anywhere on a line.  The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
12
#
13 14 15
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
16
#
17 18 19 20 21
# This file is read on server startup and when the server receives a SIGHUP
# signal.  If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pg_ctl reload".  Some
# parameters, which are marked below, require a server shutdown and restart to
# take effect.
22
#
23 24 25 26
# Any parameter can also be given as a command-line option to the server, e.g.,
# "postgres -c log_connections=on".  Some parameters can be changed at run time
# with the "SET" SQL command.
#
27 28 29 30 31
# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
#                MB = megabytes                     s   = seconds
#                GB = gigabytes                     min = minutes
#                                                   h   = hours
#                                                   d   = days
32 33


34
#------------------------------------------------------------------------------
35
# FILE LOCATIONS
36
#------------------------------------------------------------------------------
37

38 39
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
40

41
#data_directory = 'ConfigDir'		# use data in another directory
42
					# (change requires restart)
43
#hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
44 45 46
					# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf'	# ident configuration file
					# (change requires restart)
47

48 49 50
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)'		# write an extra PID file
					# (change requires restart)
51 52


53
#------------------------------------------------------------------------------
54
# CONNECTIONS AND AUTHENTICATION
55
#------------------------------------------------------------------------------
56 57

# - Connection Settings -
58

59
#listen_addresses = '*'			# what IP address(es) to listen on;
T
Tom Lane 已提交
60
					# comma-separated list of addresses;
61
					# defaults to '*', '*' = all
62
					# (change requires restart)
63 64 65 66 67 68 69 70 71 72 73

#port = 5432				# sets the database listener port for 
      					# a Greenplum instance. The master and 
					# each segment has its own port number. 
# note: Port numbers for the Greenplum system must also be changed in the
# gp_configuration catalog. See the Greenplum Database Administrator Guide 
# for instructions!
#
# WARNING: YOU MUST SHUT DOWN YOUR GREENPLUM SYSTEM BEFORE CHANGING 
# THE PORT NUMBER IN THIS FILE.

74
#max_connections = 200			# (change requires restart)
75
# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
76
# connection slot, plus lock space (see max_locks_per_transaction).
77
#superuser_reserved_connections = 3	# (change requires restart)
78 79
#unix_socket_directory = ''		# (change requires restart)
#unix_socket_group = ''			# (change requires restart)
80
#unix_socket_permissions = 0777		# begin with 0 to use octal notation
81
					# (change requires restart)
82
#bonjour_name = ''			# defaults to the computer name
83
					# (change requires restart)
84

85
# - Security and Authentication -
86

87
#authentication_timeout = 1min		# 1s-600s
88
#ssl = off				# (change requires restart)
89 90
#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
					# (change requires restart)
91
#ssl_renegotiation_limit = 512MB	# amount of data between renegotiations
92 93
#password_encryption = on
#db_user_namespace = off
94

95
# Kerberos and GSSAPI
96 97 98
#krb_server_keyfile = ''
#krb_srvname = 'postgres'		# (Kerberos only)
#krb_caseins_users = off
99

100
# - TCP Keepalives -
101
# see "man 7 tcp" for details
102 103 104 105 106 107 108 109

#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
					# 0 selects the system default
#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
					# 0 selects the system default
#tcp_keepalives_count = 0		# TCP_KEEPCNT;
					# 0 selects the system default

110

111
#------------------------------------------------------------------------------
112
# RESOURCE USAGE (except WAL)
113
#------------------------------------------------------------------------------
114 115

# - Memory -
116

117
#shared_buffers = 128MB			# min 128kB
118
					# (change requires restart)
119
#temp_buffers = 8MB			# min 800kB
120
max_prepared_transactions = 250		# can be 0 or more
121
					# (change requires restart)
122
# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
123
# per transaction slot, plus lock space (see max_locks_per_transaction).
124 125
#work_mem = 32MB			# min 64kB
#maintenance_work_mem = 64MB		# min 1MB
126
#max_stack_depth = 2MB			# min 100kB
127

128
# - Kernel Resource Usage -
129

130
#max_files_per_process = 1000		# min 25
131
					# (change requires restart)
132
#shared_preload_libraries = ''		# (change requires restart)
133

134 135
# - Cost-Based Vacuum Delay -

136
#vacuum_cost_delay = 0ms		# 0-100 milliseconds
137 138 139
#vacuum_cost_page_hit = 1		# 0-10000 credits
#vacuum_cost_page_miss = 10		# 0-10000 credits
#vacuum_cost_page_dirty = 20		# 0-10000 credits
140
#vacuum_cost_limit = 200		# 1-10000 credits
141

142 143
# - Asynchronous Behavior -

B
Bruce Momjian 已提交
144
#effective_io_concurrency = 1		# 1-1000. 0 disables prefetching
145

146
#------------------------------------------------------------------------------
147
# QUERY TUNING
148
#------------------------------------------------------------------------------
149

150
# - Planner Method Configuration -
151

152 153 154 155
#enable_bitmapscan = on
#enable_indexscan = on
#enable_seqscan = on
#enable_tidscan = on
156

157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
#enable_hashjoin = on
#enable_mergejoin = off
#enable_nestloop = off
#gp_enable_adaptive_nestloop = on

#gp_enable_multiphase_agg = on
#gp_enable_preunique = on
#gp_enable_agg_distinct = on
#gp_enable_agg_distinct_pruning = on
#enable_groupagg = on
#enable_hashagg = on
#gp_selectivity_damping_for_scans = on
#gp_selectivity_damping_for_joins = off

#enable_sort = on
#gp_enable_sort_limit = on
#gp_enable_sort_distinct = on

175
# - Planner Cost Constants -
176

177
#seq_page_cost = 1.0			# measured on an arbitrary scale
178 179
#random_page_cost = 100			# same scale as above

180
#cpu_tuple_cost = 0.01			# same scale as above
181
#cpu_index_tuple_cost = 0.005		# same scale as above
182
#cpu_operator_cost = 0.0025		# same scale as above
183
#gp_motion_cost_per_row = 0.0  # (same) (if 0, 2*cpu_tuple_cost is used)
184

185
#effective_cache_size = 4MB
186

187
# - Other Planner Options -
188

189
#cursor_tuple_fraction = 0.1		# range 0.0-1.0
190 191
#from_collapse_limit = 20
#join_collapse_limit = 20		# 1 disables collapsing of explicit
192
					# JOIN clauses
193
#gp_segments_for_planner = 0     # if 0, actual number of segments is used
194

195
#gp_enable_direct_dispatch = on
196

197 198 199
optimizer_analyze_root_partition = on # stats collection on root partitions

#------------------------------------------------------------------------------
200
# ERROR REPORTING AND LOGGING
201
#------------------------------------------------------------------------------
202

203
# - Set gp_reraise_signal to on to generate core files on SIGSEGV
204

205
#gp_reraise_signal = off
206

207
# - Where to Log -
208

209 210 211 212
#log_truncate_on_rotation = off		# If on, an existing log file of the
					# same name as the new log file will be
					# truncated rather than appended to.
					# But such truncation only occurs on
213
					# time-driven rotation, not on restarts
214
					# or size-driven rotation.  Default is
215 216
					# off, meaning append to existing files
					# in all cases.
217
#log_rotation_age = 1d			# Automatic rotation of logfiles will
B
Bruce Momjian 已提交
218
					# happen after that time.  0 disables.
219
#log_rotation_size = 10MB		# Automatic rotation of logfiles will 
220
					# happen after that much log output.
B
Bruce Momjian 已提交
221
					# 0 disables.
222

223
# - When to Log -
224

225
#client_min_messages = notice		# values in order of decreasing detail:
226 227 228 229 230 231 232 233 234 235
					#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
					#   log
					#   notice
					#   warning
					#   error

236
#log_min_messages = warning		# values in order of decreasing detail:
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
					#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
					#   info
					#   notice
					#   warning
					#   error
					#   log
					#   fatal
					#   panic

#log_error_verbosity = default		# terse, default, or verbose messages

252
#log_min_error_statement = error	# values in order of decreasing detail:
253 254 255 256 257 258 259 260 261
				 	#   debug5
					#   debug4
					#   debug3
					#   debug2
					#   debug1
				 	#   info
					#   notice
					#   warning
					#   error
262
					#   log
263 264
					#   fatal
					#   panic (effectively off)
265

266
#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
267
					# and their durations, > 0 logs only
268 269
					# statements running at least this number
					# of milliseconds
270

271
# - What to Log -
272

273 274
#debug_print_parse = off
#debug_print_rewritten = off
275 276
#debug_print_prelim_plan = off
#debug_print_slice_table = off
277
#debug_print_plan = off
278
#debug_pretty_print = on
279
#log_checkpoints = off
280 281 282 283
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_hostname = off
284

285
#log_statement = 'none'			# none, mod, ddl, all
286
#log_temp_files = -1			# Log temporary files equal or larger
287
					# than the specified number of kilobytes.
288
					# -1 disables;  0 logs all temp files
289 290
#log_timezone = unknown			# actually, defaults to TZ environment
					# setting
291

292 293 294 295 296 297 298 299 300 301 302 303 304 305
#------------------------------------------------------------------------------
# PL/JAVA
#------------------------------------------------------------------------------
#pljava_classpath = ''                      # ':' separated list of installed jar files
#pljava_vmoptions = ''                      # Options sent to the JVM on startup
#pljava_statement_cache_size = 0            # Size of the prepared statement MRU cache
#pljava_release_lingering_savepoints = off  # on/off to release/abort lingering savepoints


#------------------------------------------------------------------------------
# PERFORMANCE MONITOR
#------------------------------------------------------------------------------

#gp_enable_gpperfmon=on		# Enable the performance monitor
S
Sumedh Kadoo 已提交
306
#gpperfmon_port=8888		# Port used by the performance monitor daemons
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358

										
#------------------------------------------------------------------------------
# EMAIL ALERTS
#------------------------------------------------------------------------------

# Configure the DNS name of the SMTP server you want to use,
# the port it runs on (which will be either 25 or 587), and
# the SASL authentication information used to connect to it.

#gp_email_smtp_server = 'localhost:25'      # SMTP server hostname and port (don't forget the port!)
#gp_email_smtp_userid = ''					# Userid used to authenticate with SMTP server, if needed
#gp_email_smtp_password = ''				# Password/Passphrase used to authenticate with SMTP server, if needed

# Here you need to specify e-mail addresses.  The email_from address doesn't actually need 
# to be a valid e-mail address, but it is much better if it is, because delivery failure notifications
# go to that address.  The email_to is a list of recipients who will get the alerts.
#
# The e-mail addresses need to be in the form of userid@domain.com, not just userid.
# If email_to list is empty, it disables e-mail alerts.
#
# e-mail addresses can be just the actual e-mail address, userid@domain.com, or can be a
# human readable name with attached e-mail address in the form 'Joe Smith <userid@domain.com>".
# If using the latter format, the e-mail address must be between '<' and '>'.  The first part of
# the string can be any text, and if used for the gp_email_from address, can help differentiate the e-mails
# from different servers (for example:  'my test GPDB system <userid@domain.com>").

#gp_email_from = ''						# Who do we say the e-mails are from?  and who is the return-path?
#gp_email_to = ''						# Semicolon separated list of recipients that will get e-mail alerts.
										# empty means disable e-mail alerts.

#------------------------------------------------------------------------------
# SNMP INFORM/TRAP ALERTS
#------------------------------------------------------------------------------

# Configure the gp_snmp_monitor_address to be the system your SNMP monitor runs on, or a proxy
# that will relay the message to the SNMP monitor.  You can specify transport, DNS name, and port:
# [<transport-specifier>:]<transport-address>[:port]
#
# where <transport-specifier> can be 'udp', 'tcp', 'udpv6', 'tcpv6', or 'unix' for unix domain sockets (optional).
# For udp or tcp, the port is typically 162. 
# For a SNMP monitor running locally, you might use 'localhost:162', but more typically
# the SNMP monitor is running on some other machine.
# You can send to multiple network monitors by using a comma separated list of addresses.
#
# if gp_snmp_peername is empty, snmp alerts are disabled.

#gp_snmp_monitor_address = ''     		# name or IP address(es) (and optionally the port) of the SNMP monitor(s) that will receive the alerts.
#gp_snmp_community = 'public'			# Change to whatever community string you use in your monitor
#gp_snmp_use_inform_or_trap = 'trap'    # Set to 'inform' or 'trap', we will send SNMP v2c inform, or SNMP v2c trap.

#------------------------------------------------------------------------------
359
# RUNTIME STATISTICS
360 361 362
#------------------------------------------------------------------------------

# - ANALYZE Statistics on Database Contents -
363

364
#default_statistics_target = 100	# range 1 - 10000 (target # of
365 366 367 368
					# histogram bins)
#gp_analyze_relative_error = 0.25	# range 0.0 - 1.0 (target relative
					# error fraction)
					
369
# - Query/Index Statistics Collector -
370

371 372
#track_activities = on
#track_counts = off
373
#track_functions = none			# none, pl, all
374
#track_activity_query_size = 1024
375
#update_process_title = on
376
#stats_temp_directory = 'pg_stat_tmp'
377

378
#stats_queue_level = off
379

380

381 382 383 384 385 386 387
# - Statistics Monitoring -

#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off

388

389 390 391
gp_autostats_mode=on_no_stats		# none, on_no_stats, on_change. see documentation for semantics.
gp_autostats_on_change_threshold=2147483647 # [0..INT_MAX]. see documentation for semantics.
log_autostats=off	# print additional autostats information
392

393
#------------------------------------------------------------------------------
394
# AUTOVACUUM PARAMETERS
395 396 397 398 399 400
#------------------------------------------------------------------------------

#autovacuum = on			# Enable autovacuum subprocess?  'on' 
					# requires track_counts to also be on.
#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
					# their durations, > 0 logs only
401 402
					# actions running at least this number
					# of milliseconds.
403
#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
404
#autovacuum_naptime = 1min		# time between autovacuum runs
405
#autovacuum_vacuum_threshold = 50	# min number of row updates before
406
					# vacuum
407
#autovacuum_analyze_threshold = 50	# min number of row updates before 
408
					# analyze
409 410
#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
411 412
#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
					# (change requires restart)
413 414 415
#autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
					# autovacuum, in milliseconds;
					# -1 means use vacuum_cost_delay
416
#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
417
					# autovacuum, -1 means use
418
					# vacuum_cost_limit
419

420
#------------------------------------------------------------------------------
421
# CLIENT CONNECTION DEFAULTS
422
#------------------------------------------------------------------------------
423 424

# - Statement Behavior -
425

426
#search_path = '"$user",public'		# schema names
427
#default_tablespace = ''		# a tablespace name, '' uses the default
428
#check_function_bodies = on
429
#default_transaction_isolation = 'read committed'
430
#default_transaction_read_only = off
431
#session_replication_role = 'origin'
432
#statement_timeout = 0			# 0 is disabled
433
#idle_session_gang_timeout = 18s 	# in milliseconds, 0 is disabled
434 435
#vacuum_freeze_min_age = 50000000
#vacuum_freeze_table_age = 150000000
436
#bytea_output='escape'
H
Heikki Linnakangas 已提交
437
#gin_fuzzy_search_limit = 0
438

439
# - Locale and Formatting -
440

441
#datestyle = 'iso, mdy'
442
#intervalstyle = 'postgres'
443 444 445
#timezone = unknown			# actually, defaults to TZ environment
					# setting
#timezone_abbreviations = 'Default'     # Select the set of available time zone
446
					# abbreviations.  Currently, there are
447 448 449
					#   Default
					#   Australia
					#   India
450 451
					# You can create your own file in
					# share/timezonesets/.
452 453 454
#extra_float_digits = 0			# min -15, max 2
#client_encoding = sql_ascii		# actually, defaults to database
					# encoding
455

456 457
# These settings are initialized by initdb, but they can be changed.
#lc_messages = 'C'			# locale for system error message
458 459 460 461
					# strings
#lc_monetary = 'C'			# locale for monetary formatting
#lc_numeric = 'C'			# locale for number formatting
#lc_time = 'C'				# locale for time formatting
462

463 464 465
# default configuration for text search
#default_text_search_config = 'pg_catalog.simple'

466
# - Other Defaults -
467 468

#dynamic_library_path = '$libdir'
469
#explain_pretty_print = on
470
#local_preload_libraries = ''
471

472

473
#------------------------------------------------------------------------------
474
# LOCK MANAGEMENT
475
#------------------------------------------------------------------------------
476

477
#deadlock_timeout = 1s
478
#max_locks_per_transaction = 128		# min 10
479
					# (change requires restart)
480
# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
481 482
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
# lock table slots.
483 484


485
#---------------------------------------------------------------------------
486 487 488 489 490 491 492 493 494 495
# RESOURCE SCHEDULING
#---------------------------------------------------------------------------

#max_resource_queues = 9		# no. of resource queues to create.
#max_resource_portals_per_transaction = 64	# no. of portals per backend.
#resource_select_only = on		# resource lock SELECT queries only.
#resource_cleanup_gangs_on_wait = on	# Cleanup idle reader gangs before
										# resource lockwait.
gp_resqueue_memory_policy = 'eager_free'	# memory request based queueing. 
									# eager_free, auto or none
496

497 498
#---------------------------------------------------------------------------
# EXTERNAL TABLES
499
#---------------------------------------------------------------------------
500
#gp_external_enable_exec = on   # enable external tables with EXECUTE.
501

502 503 504 505 506 507 508 509 510 511 512
#---------------------------------------------------------------------------
# APPEND ONLY TABLES
#---------------------------------------------------------------------------
#gp_safefswritesize = 0   # minimum size for safe AO writes in a non-mature fs
max_appendonly_tables = 10000 # Maximum number of append only tables that can 
							  # participate in writing data concurrently.
#------------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#------------------------------------------------------------------------------

# - Previous PostgreSQL Versions -
513

514
#add_missing_from = off
515
#array_nulls = on
516
#backslash_quote = safe_encoding	# on, off, or safe_encoding
517
#escape_string_warning = on
518
#regex_flavor = advanced		# advanced, extended, or basic
519
#standard_conforming_strings = on
520
#synchronize_seqscans = on
521

522
# - Other Platforms and Clients -
523

524
#transform_null_equals = off
525 526 527


#---------------------------------------------------------------------------
528
# GREENPLUM ARRAY CONFIGURATION
529 530
#---------------------------------------------------------------------------

531 532 533 534 535 536 537 538 539 540 541
#---------------------------------------------------------------------------
# GREENPLUM ARRAY TUNING
#---------------------------------------------------------------------------

# - Interconnect -

#gp_max_packet_size = 8192
gp_interconnect_type=udpifc

# - Worker Process Creation -

542
gp_connections_per_thread = 0
543 544 545 546 547 548 549 550 551 552 553 554 555
gp_segment_connect_timeout = 600s

# - Resource limits -
gp_vmem_protect_limit = 8192  #Virtual memory limit (in MB).
#gp_vmem_idle_resource_timeout = 18000 # idle-time before gang-release, in milliseconds (zero disables release).

#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------

#custom_variable_classes = ''			# list of custom variable class names
gp_backup_directIO = off				# enable\disable dump with direct IO
gp_backup_directIO_read_chunk_mb = 20	# Size of read Chunk buffer in directIO dump (in MB)