1
# -----------------------------
2
# PostgreSQL configuration file
3
# -----------------------------
5
# This file consists of lines of the form:
9
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
10
# "#" anywhere on a line. The complete list of parameter names and allowed
11
# values can be found in the PostgreSQL documentation.
13
# The commented-out settings shown in this file represent the default values.
14
# Re-commenting a setting is NOT sufficient to revert it to the default value;
15
# you need to reload the server.
17
# This file is read on server startup and when the server receives a SIGHUP
18
# signal. If you edit the file on a running system, you have to SIGHUP the
19
# server for the changes to take effect, run "pg_ctl reload", or execute
20
# "SELECT pg_reload_conf()". Some parameters, which are marked below,
21
# require a server shutdown and restart to take effect.
23
# Any parameter can also be given as a command-line option to the server, e.g.,
24
# "postgres -c log_connections=on". Some parameters can be changed at run time
25
# with the "SET" SQL command.
27
# Memory units: kB = kilobytes Time units: ms = milliseconds
28
# MB = megabytes s = seconds
29
# GB = gigabytes min = minutes
30
# TB = terabytes h = hours
34
#------------------------------------------------------------------------------
36
#------------------------------------------------------------------------------
38
# The default values of these variables are driven from the -D command-line
39
# option or PGDATA environment variable, represented here as ConfigDir.
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
# (change requires restart)
45
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
46
# (change requires restart)
48
# If external_pid_file is not explicitly set, no extra PID file is written.
49
#external_pid_file = '' # write an extra PID file
50
# (change requires restart)
53
#------------------------------------------------------------------------------
54
# CONNECTIONS AND AUTHENTICATION
55
#------------------------------------------------------------------------------
57
# - Connection Settings -
60
# comma-separated list of addresses;
61
# defaults to 'localhost'; use '*' for all
62
# (change requires restart)
63
#port = 5432 # (change requires restart)
64
#max_connections = 100 # (change requires restart)
65
#superuser_reserved_connections = 3 # (change requires restart)
66
#unix_socket_directories = '/tmp' # comma-separated list of directories
67
# (change requires restart)
68
#unix_socket_group = '' # (change requires restart)
69
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
70
# (change requires restart)
71
#bonjour = off # advertise server via Bonjour
72
# (change requires restart)
73
#bonjour_name = '' # defaults to the computer name
74
# (change requires restart)
77
# see "man 7 tcp" for details
79
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
80
# 0 selects the system default
81
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
82
# 0 selects the system default
83
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
84
# 0 selects the system default
88
#authentication_timeout = 1min # 1s-600s
89
#password_encryption = md5 # md5 or scram-sha-256
90
#db_user_namespace = off
92
# GSSAPI using Kerberos
93
#krb_server_keyfile = ''
94
#krb_caseins_users = off
100
#ssl_cert_file = 'server.crt'
102
#ssl_key_file = 'server.key'
103
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
104
#ssl_prefer_server_ciphers = on
105
#ssl_ecdh_curve = 'prime256v1'
106
#ssl_dh_params_file = ''
107
#ssl_passphrase_command = ''
108
#ssl_passphrase_command_supports_reload = off
111
#------------------------------------------------------------------------------
112
# RESOURCE USAGE (except WAL)
113
#------------------------------------------------------------------------------
117
#shared_buffers = 32MB # min 128kB
118
# (change requires restart)
119
#huge_pages = try # on, off, or try
120
# (change requires restart)
121
#temp_buffers = 8MB # min 800kB
122
#max_prepared_transactions = 0 # zero disables the feature
123
# (change requires restart)
124
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
125
# you actively intend to use prepared transactions.
126
#work_mem = 4MB # min 64kB
127
#maintenance_work_mem = 64MB # min 1MB
128
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
129
#max_stack_depth = 2MB # min 100kB
130
#dynamic_shared_memory_type = posix # the default is the first option
131
# supported by the operating system:
136
# use none to disable dynamic shared memory
137
# (change requires restart)
141
#temp_file_limit = -1 # limits per-process temp file space
142
# in kB, or -1 for no limit
144
# - Kernel Resources -
146
#max_files_per_process = 1000 # min 25
147
# (change requires restart)
149
# - Cost-Based Vacuum Delay -
151
#vacuum_cost_delay = 0 # 0-100 milliseconds
152
#vacuum_cost_page_hit = 1 # 0-10000 credits
153
#vacuum_cost_page_miss = 10 # 0-10000 credits
154
#vacuum_cost_page_dirty = 20 # 0-10000 credits
155
#vacuum_cost_limit = 200 # 1-10000 credits
157
# - Background Writer -
159
#bgwriter_delay = 200ms # 10-10000ms between rounds
160
#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables
161
#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
162
#bgwriter_flush_after = 0 # measured in pages, 0 disables
164
# - Asynchronous Behavior -
166
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
167
#max_worker_processes = 8 # (change requires restart)
168
#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers
169
#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers
170
#parallel_leader_participation = on
171
#max_parallel_workers = 8 # maximum number of max_worker_processes that
172
# can be used in parallel operations
173
#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
174
# (change requires restart)
175
#backend_flush_after = 0 # measured in pages, 0 disables
178
#------------------------------------------------------------------------------
180
#------------------------------------------------------------------------------
184
#wal_level = replica # minimal, replica, or logical
185
# (change requires restart)
186
#fsync = on # flush data to disk for crash safety
187
# (turning this off can cause
188
# unrecoverable data corruption)
189
#synchronous_commit = on # synchronization level;
190
# off, local, remote_write, remote_apply, or on
191
#wal_sync_method = fsync # the default is the first option
192
# supported by the operating system:
194
# fdatasync (default on Linux)
198
#full_page_writes = on # recover from partial page writes
199
#wal_compression = off # enable compression of full-page writes
200
#wal_log_hints = off # also do full page writes of non-critical updates
201
# (change requires restart)
202
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
203
# (change requires restart)
204
#wal_writer_delay = 200ms # 1-10000 milliseconds
205
#wal_writer_flush_after = 1MB # measured in pages, 0 disables
207
#commit_delay = 0 # range 0-100000, in microseconds
208
#commit_siblings = 5 # range 1-1000
212
#checkpoint_timeout = 5min # range 30s-1d
215
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
216
#checkpoint_flush_after = 0 # measured in pages, 0 disables
217
#checkpoint_warning = 30s # 0 disables
221
#archive_mode = off # enables archiving; off, on, or always
222
# (change requires restart)
223
#archive_command = '' # command to use to archive a logfile segment
224
# placeholders: %p = path of file to archive
225
# %f = file name only
226
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
227
#archive_timeout = 0 # force a logfile segment switch after this
228
# number of seconds; 0 disables
231
#------------------------------------------------------------------------------
233
#------------------------------------------------------------------------------
237
# Set these on the master and on any standby that will send replication data.
239
#max_wal_senders = 10 # max number of walsender processes
240
# (change requires restart)
241
#wal_keep_segments = 0 # in logfile segments; 0 disables
242
#wal_sender_timeout = 60s # in milliseconds; 0 disables
244
#max_replication_slots = 10 # max number of replication slots
245
# (change requires restart)
246
#track_commit_timestamp = off # collect timestamp of transaction commit
247
# (change requires restart)
251
# These settings are ignored on a standby server.
253
#synchronous_standby_names = '' # standby servers that provide sync rep
254
# method to choose sync standbys, number of sync standbys,
255
# and comma-separated list of application_name
256
# from standby(s); '*' = all
257
#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
261
# These settings are ignored on a master server.
263
#hot_standby = on # "off" disallows queries during recovery
264
# (change requires restart)
265
#max_standby_archive_delay = 30s # max delay before canceling queries
266
# when reading WAL from archive;
267
# -1 allows indefinite delay
268
#max_standby_streaming_delay = 30s # max delay before canceling queries
269
# when reading streaming WAL;
270
# -1 allows indefinite delay
271
#wal_receiver_status_interval = 10s # send replies at least this often
273
#hot_standby_feedback = off # send info from standby to prevent
275
#wal_receiver_timeout = 60s # time that receiver waits for
276
# communication from master
277
# in milliseconds; 0 disables
278
#wal_retrieve_retry_interval = 5s # time to wait before retrying to
279
# retrieve WAL after a failed attempt
283
# These settings are ignored on a publisher.
285
#max_logical_replication_workers = 4 # taken from max_worker_processes
286
# (change requires restart)
287
#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers
290
#------------------------------------------------------------------------------
292
#------------------------------------------------------------------------------
294
# - Planner Method Configuration -
296
#enable_bitmapscan = on
299
#enable_indexscan = on
300
#enable_indexonlyscan = on
302
#enable_mergejoin = on
304
#enable_parallel_append = on
308
#enable_partitionwise_join = off
309
#enable_partitionwise_aggregate = off
310
#enable_parallel_hash = on
311
#enable_partition_pruning = on
313
# - Planner Cost Constants -
315
#seq_page_cost = 1.0 # measured on an arbitrary scale
316
#random_page_cost = 4.0 # same scale as above
317
#cpu_tuple_cost = 0.01 # same scale as above
318
#cpu_index_tuple_cost = 0.005 # same scale as above
319
#cpu_operator_cost = 0.0025 # same scale as above
320
#parallel_tuple_cost = 0.1 # same scale as above
321
#parallel_setup_cost = 1000.0 # same scale as above
323
#jit_above_cost = 100000 # perform JIT compilation if available
324
# and query more expensive than this;
326
#jit_inline_above_cost = 500000 # inline small functions if query is
327
# more expensive than this; -1 disables
328
#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if
329
# query is more expensive than this;
332
#min_parallel_table_scan_size = 8MB
333
#min_parallel_index_scan_size = 512kB
334
#effective_cache_size = 4GB
336
# - Genetic Query Optimizer -
340
#geqo_effort = 5 # range 1-10
341
#geqo_pool_size = 0 # selects default based on effort
342
#geqo_generations = 0 # selects default based on effort
343
#geqo_selection_bias = 2.0 # range 1.5-2.0
344
#geqo_seed = 0.0 # range 0.0-1.0
346
# - Other Planner Options -
348
#default_statistics_target = 100 # range 1-10000
349
#constraint_exclusion = partition # on, off, or partition
350
#cursor_tuple_fraction = 0.1 # range 0.0-1.0
351
#from_collapse_limit = 8
352
#join_collapse_limit = 8 # 1 disables collapsing of explicit
354
#force_parallel_mode = off
355
#jit = off # allow JIT compilation
358
#------------------------------------------------------------------------------
359
# REPORTING AND LOGGING
360
#------------------------------------------------------------------------------
364
#log_destination = 'stderr' # Valid values are combinations of
365
# stderr, csvlog, syslog, and eventlog,
366
# depending on platform. csvlog
367
# requires logging_collector to be on.
369
# This is used when logging to stderr:
370
#logging_collector = off # Enable capturing of stderr and csvlog
371
# into log files. Required to be on for
373
# (change requires restart)
375
# These are only used if logging_collector is on:
376
#log_directory = 'log' # directory where log files are written,
377
# can be absolute or relative to PGDATA
378
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
379
# can include strftime() escapes
380
#log_file_mode = 0600 # creation mode for log files,
381
# begin with 0 to use octal notation
382
#log_truncate_on_rotation = off # If on, an existing log file with the
383
# same name as the new log file will be
384
# truncated rather than appended to.
385
# But such truncation only occurs on
386
# time-driven rotation, not on restarts
387
# or size-driven rotation. Default is
388
# off, meaning append to existing files
390
#log_rotation_age = 1d # Automatic rotation of logfiles will
391
# happen after that time. 0 disables.
392
#log_rotation_size = 10MB # Automatic rotation of logfiles will
393
# happen after that much log output.
396
# These are relevant when logging to syslog:
397
#syslog_facility = 'LOCAL0'
398
#syslog_ident = 'postgres'
399
#syslog_sequence_numbers = on
400
#syslog_split_messages = on
402
# This is only relevant when logging to eventlog (win32):
403
# (change requires restart)
404
#event_source = 'PostgreSQL'
408
#log_min_messages = warning # values in order of decreasing detail:
422
#log_min_error_statement = error # values in order of decreasing detail:
434
# panic (effectively off)
436
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
437
# and their durations, > 0 logs only
438
# statements running at least this number
444
#debug_print_parse = off
445
#debug_print_rewritten = off
446
#debug_print_plan = off
447
#debug_pretty_print = on
448
#log_checkpoints = off
449
#log_connections = off
450
#log_disconnections = off
452
#log_error_verbosity = default # terse, default, or verbose messages
454
#log_line_prefix = '%m [%p] ' # special values:
455
# %a = application name
458
# %r = remote host and port
461
# %t = timestamp without milliseconds
462
# %m = timestamp with milliseconds
463
# %n = timestamp with milliseconds (as a Unix epoch)
467
# %l = session line number
468
# %s = session start timestamp
469
# %v = virtual transaction ID
470
# %x = transaction ID (0 if none)
471
# %q = stop here in non-session
475
#log_lock_waits = off # log lock waits >= deadlock_timeout
476
#log_statement = 'none' # none, ddl, mod, all
477
#log_replication_commands = off
478
#log_temp_files = -1 # log temporary files equal or larger
479
# than the specified size in kilobytes;
480
# -1 disables, 0 logs all temp files
483
#------------------------------------------------------------------------------
485
#------------------------------------------------------------------------------
487
#cluster_name = '' # added to process titles if nonempty
488
# (change requires restart)
489
#update_process_title = on
492
#------------------------------------------------------------------------------
494
#------------------------------------------------------------------------------
496
# - Query and Index Statistics Collector -
498
#track_activities = on
500
#track_io_timing = off
501
#track_functions = none # none, pl, all
502
#track_activity_query_size = 1024 # (change requires restart)
503
#stats_temp_directory = 'pg_stat_tmp'
508
#log_parser_stats = off
509
#log_planner_stats = off
510
#log_executor_stats = off
511
#log_statement_stats = off
514
#------------------------------------------------------------------------------
516
#------------------------------------------------------------------------------
518
#autovacuum = on # Enable autovacuum subprocess? 'on'
519
# requires track_counts to also be on.
520
#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
521
# their durations, > 0 logs only
522
# actions running at least this number
524
#autovacuum_max_workers = 3 # max number of autovacuum subprocesses
525
# (change requires restart)
526
#autovacuum_naptime = 1min # time between autovacuum runs
527
#autovacuum_vacuum_threshold = 50 # min number of row updates before
529
#autovacuum_analyze_threshold = 50 # min number of row updates before
531
#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
532
#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
533
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
534
# (change requires restart)
535
#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
536
# before forced vacuum
537
# (change requires restart)
538
#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
539
# autovacuum, in milliseconds;
540
# -1 means use vacuum_cost_delay
541
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
542
# autovacuum, -1 means use
546
#------------------------------------------------------------------------------
547
# CLIENT CONNECTION DEFAULTS
548
#------------------------------------------------------------------------------
550
# - Statement Behavior -
552
#client_min_messages = notice # values in order of decreasing detail:
562
#search_path = '"$user", public' # schema names
564
#default_tablespace = '' # a tablespace name, '' uses the default
565
#temp_tablespaces = '' # a list of tablespace names, '' uses
566
# only default tablespace
567
#check_function_bodies = on
568
#default_transaction_isolation = 'read committed'
569
#default_transaction_read_only = off
570
#default_transaction_deferrable = off
571
#session_replication_role = 'origin'
572
#statement_timeout = 0 # in milliseconds, 0 is disabled
573
#lock_timeout = 0 # in milliseconds, 0 is disabled
574
#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled
575
#vacuum_freeze_min_age = 50000000
576
#vacuum_freeze_table_age = 150000000
577
#vacuum_multixact_freeze_min_age = 5000000
578
#vacuum_multixact_freeze_table_age = 150000000
579
#vacuum_cleanup_index_scale_factor = 0.1 # fraction of total number of tuples
580
# before index cleanup, 0 always performs
582
#bytea_output = 'hex' # hex, escape
584
#xmloption = 'content'
585
#gin_fuzzy_search_limit = 0
586
#gin_pending_list_limit = 4MB
588
# - Locale and Formatting -
590
#datestyle = 'iso, mdy'
591
#intervalstyle = 'postgres'
593
#timezone_abbreviations = 'Default' # Select the set of available time zone
594
# abbreviations. Currently, there are
596
# Australia (historical usage)
598
# You can create your own file in
599
# share/timezonesets/.
600
#extra_float_digits = 0 # min -15, max 3
601
#client_encoding = sql_ascii # actually, defaults to database
604
# These settings are initialized by initdb, but they can be changed.
605
#lc_messages = 'C' # locale for system error message
607
#lc_monetary = 'C' # locale for monetary formatting
608
#lc_numeric = 'C' # locale for number formatting
609
#lc_time = 'C' # locale for time formatting
611
# default configuration for text search
612
#default_text_search_config = 'pg_catalog.simple'
614
# - Shared Library Preloading -
616
#shared_preload_libraries = '' # (change requires restart)
617
#local_preload_libraries = ''
618
#session_preload_libraries = ''
619
#jit_provider = 'llvmjit' # JIT library to use
623
#dynamic_library_path = '$libdir'
626
#------------------------------------------------------------------------------
628
#------------------------------------------------------------------------------
630
#deadlock_timeout = 1s
631
#max_locks_per_transaction = 64 # min 10
632
# (change requires restart)
633
#max_pred_locks_per_transaction = 64 # min 10
634
# (change requires restart)
635
#max_pred_locks_per_relation = -2 # negative values mean
636
# (max_pred_locks_per_transaction
637
# / -max_pred_locks_per_relation) - 1
638
#max_pred_locks_per_page = 2 # min 0
641
#------------------------------------------------------------------------------
642
# VERSION AND PLATFORM COMPATIBILITY
643
#------------------------------------------------------------------------------
645
# - Previous PostgreSQL Versions -
648
#backslash_quote = safe_encoding # on, off, or safe_encoding
649
#default_with_oids = off
650
#escape_string_warning = on
651
#lo_compat_privileges = off
652
#operator_precedence_warning = off
653
#quote_all_identifiers = off
654
#standard_conforming_strings = on
655
#synchronize_seqscans = on
657
# - Other Platforms and Clients -
659
#transform_null_equals = off
662
#------------------------------------------------------------------------------
664
#------------------------------------------------------------------------------
666
#exit_on_error = off # terminate session on any error?
667
#restart_after_crash = on # reinitialize after backend crash?
668
#data_sync_retry = off # retry or panic on failure to fsync
670
# (change requires restart)
673
#------------------------------------------------------------------------------
674
# CONFIG FILE INCLUDES
675
#------------------------------------------------------------------------------
677
# These options allow settings to be loaded from files other than the
678
# default postgresql.conf. Note that these are directives, not variable
679
# assignments, so they can usefully be given more than once.
681
#include_dir = '...' # include files ending in '.conf' from
682
# a directory, e.g., 'conf.d'
683
#include_if_exists = '...' # include file only if it exists
684
#include = '...' # include file
687
#------------------------------------------------------------------------------
689
#------------------------------------------------------------------------------
691
# Add settings for extensions here