github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/pkg/ddevapp/postgres/9/postgresql.conf (about) 1 # ----------------------------- 2 #ddev-generated Postgres 9 configuration file 3 # If you want to take over this file and customize it, remove the line above 4 # and ddev will respect it and won't overwrite the file. 5 # See https://ddev.readthedocs.io/en/stable/users/extend/customization-extendibility/ 6 # 7 8 # PostgreSQL configuration file 9 # ----------------------------- 10 # 11 # This file consists of lines of the form: 12 # 13 # name = value 14 # 15 # (The "=" is optional.) Whitespace may be used. Comments are introduced with 16 # "#" anywhere on a line. The complete list of parameter names and allowed 17 # values can be found in the PostgreSQL documentation. 18 # 19 # The commented-out settings shown in this file represent the default values. 20 # Re-commenting a setting is NOT sufficient to revert it to the default value; 21 # you need to reload the server. 22 # 23 # This file is read on server startup and when the server receives a SIGHUP 24 # signal. If you edit the file on a running system, you have to SIGHUP the 25 # server for the changes to take effect, or use "pg_ctl reload". Some 26 # parameters, which are marked below, require a server shutdown and restart to 27 # take effect. 28 # 29 # Any parameter can also be given as a command-line option to the server, e.g., 30 # "postgres -c log_connections=on". Some parameters can be changed at run time 31 # with the "SET" SQL command. 32 # 33 # Memory units: kB = kilobytes Time units: ms = milliseconds 34 # MB = megabytes s = seconds 35 # GB = gigabytes min = minutes 36 # TB = terabytes h = hours 37 # d = days 38 39 40 #------------------------------------------------------------------------------ 41 # FILE LOCATIONS 42 #------------------------------------------------------------------------------ 43 44 # The default values of these variables are driven from the -D command-line 45 # option or PGDATA environment variable, represented here as ConfigDir. 46 47 #data_directory = 'ConfigDir' # use data in another directory 48 # (change requires restart) 49 #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file 50 # (change requires restart) 51 #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file 52 # (change requires restart) 53 54 # If external_pid_file is not explicitly set, no extra PID file is written. 55 #external_pid_file = '' # write an extra PID file 56 # (change requires restart) 57 58 59 #------------------------------------------------------------------------------ 60 # CONNECTIONS AND AUTHENTICATION 61 #------------------------------------------------------------------------------ 62 63 # - Connection Settings - 64 65 listen_addresses = '*' 66 # comma-separated list of addresses; 67 # defaults to 'localhost'; use '*' for all 68 # (change requires restart) 69 #port = 5432 # (change requires restart) 70 max_connections = 250 # (change requires restart) 71 #superuser_reserved_connections = 3 # (change requires restart) 72 #unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories 73 # (change requires restart) 74 #unix_socket_group = '' # (change requires restart) 75 #unix_socket_permissions = 0777 # begin with 0 to use octal notation 76 # (change requires restart) 77 #bonjour = off # advertise server via Bonjour 78 # (change requires restart) 79 #bonjour_name = '' # defaults to the computer name 80 # (change requires restart) 81 82 # - Security and Authentication - 83 84 #authentication_timeout = 1min # 1s-600s 85 #ssl = off # (change requires restart) 86 #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers 87 # (change requires restart) 88 #ssl_prefer_server_ciphers = on # (change requires restart) 89 #ssl_ecdh_curve = 'prime256v1' # (change requires restart) 90 #ssl_cert_file = 'server.crt' # (change requires restart) 91 #ssl_key_file = 'server.key' # (change requires restart) 92 #ssl_ca_file = '' # (change requires restart) 93 #ssl_crl_file = '' # (change requires restart) 94 #password_encryption = on 95 #db_user_namespace = off 96 #row_security = on 97 98 # GSSAPI using Kerberos 99 #krb_server_keyfile = '' 100 #krb_caseins_users = off 101 102 # - TCP Keepalives - 103 # see "man 7 tcp" for details 104 105 #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; 106 # 0 selects the system default 107 #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; 108 # 0 selects the system default 109 #tcp_keepalives_count = 0 # TCP_KEEPCNT; 110 # 0 selects the system default 111 112 113 #------------------------------------------------------------------------------ 114 # RESOURCE USAGE (except WAL) 115 #------------------------------------------------------------------------------ 116 117 # - Memory - 118 119 shared_buffers = 128MB # min 128kB 120 # (change requires restart) 121 #huge_pages = try # on, off, or try 122 # (change requires restart) 123 #temp_buffers = 8MB # min 800kB 124 #max_prepared_transactions = 0 # zero disables the feature 125 # (change requires restart) 126 # Caution: it is not advisable to set max_prepared_transactions nonzero unless 127 # you actively intend to use prepared transactions. 128 #work_mem = 4MB # min 64kB 129 #maintenance_work_mem = 64MB # min 1MB 130 #replacement_sort_tuples = 150000 # limits use of replacement selection sort 131 #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem 132 #max_stack_depth = 2MB # min 100kB 133 dynamic_shared_memory_type = posix # the default is the first option 134 # supported by the operating system: 135 # posix 136 # sysv 137 # windows 138 # mmap 139 # use none to disable dynamic shared memory 140 # (change requires restart) 141 142 # - Disk - 143 144 #temp_file_limit = -1 # limits per-process temp file space 145 # in kB, or -1 for no limit 146 147 # - Kernel Resource Usage - 148 149 #max_files_per_process = 1000 # min 25 150 # (change requires restart) 151 #shared_preload_libraries = '' # (change requires restart) 152 153 # - Cost-Based Vacuum Delay - 154 155 #vacuum_cost_delay = 0 # 0-100 milliseconds 156 #vacuum_cost_page_hit = 1 # 0-10000 credits 157 #vacuum_cost_page_miss = 10 # 0-10000 credits 158 #vacuum_cost_page_dirty = 20 # 0-10000 credits 159 #vacuum_cost_limit = 200 # 1-10000 credits 160 161 # - Background Writer - 162 163 #bgwriter_delay = 200ms # 10-10000ms between rounds 164 #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round 165 #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round 166 #bgwriter_flush_after = 512kB # measured in pages, 0 disables 167 168 # - Asynchronous Behavior - 169 170 #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching 171 #max_worker_processes = 8 # (change requires restart) 172 #max_parallel_workers_per_gather = 0 # taken from max_worker_processes 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 176 177 178 #------------------------------------------------------------------------------ 179 # WRITE AHEAD LOG 180 #------------------------------------------------------------------------------ 181 182 # - Settings - 183 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: 193 # open_datasync 194 # fdatasync (default on Linux and FreeBSD) 195 # fsync 196 # fsync_writethrough 197 # open_sync 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 206 207 #commit_delay = 0 # range 0-100000, in microseconds 208 #commit_siblings = 5 # range 1-1000 209 210 # - Checkpoints - 211 212 #checkpoint_timeout = 5min # range 30s-1d 213 #max_wal_size = 1GB 214 #min_wal_size = 80MB 215 #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 216 #checkpoint_flush_after = 256kB # measured in pages, 0 disables 217 #checkpoint_warning = 30s # 0 disables 218 219 # - Archiving - 220 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 229 230 231 #------------------------------------------------------------------------------ 232 # REPLICATION 233 #------------------------------------------------------------------------------ 234 235 # - Sending Server(s) - 236 237 # Set these on the master and on any standby that will send replication data. 238 239 max_wal_senders = 55 # max number of walsender processes 240 # (change requires restart) 241 #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables 242 #wal_sender_timeout = 60s # in milliseconds; 0 disables 243 244 #max_replication_slots = 0 # max number of replication slots 245 # (change requires restart) 246 #track_commit_timestamp = off # collect timestamp of transaction commit 247 # (change requires restart) 248 249 # - Master Server - 250 251 # These settings are ignored on a standby server. 252 253 #synchronous_standby_names = '' # standby servers that provide sync rep 254 # number of sync standbys and comma-separated list of application_name 255 # from standby(s); '*' = all 256 #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed 257 258 # - Standby Servers - 259 260 # These settings are ignored on a master server. 261 262 #hot_standby = off # "on" allows queries during recovery 263 # (change requires restart) 264 #max_standby_archive_delay = 30s # max delay before canceling queries 265 # when reading WAL from archive; 266 # -1 allows indefinite delay 267 #max_standby_streaming_delay = 30s # max delay before canceling queries 268 # when reading streaming WAL; 269 # -1 allows indefinite delay 270 #wal_receiver_status_interval = 10s # send replies at least this often 271 # 0 disables 272 #hot_standby_feedback = off # send info from standby to prevent 273 # query conflicts 274 #wal_receiver_timeout = 60s # time that receiver waits for 275 # communication from master 276 # in milliseconds; 0 disables 277 #wal_retrieve_retry_interval = 5s # time to wait before retrying to 278 # retrieve WAL after a failed attempt 279 280 281 #------------------------------------------------------------------------------ 282 # QUERY TUNING 283 #------------------------------------------------------------------------------ 284 285 # - Planner Method Configuration - 286 287 #enable_bitmapscan = on 288 #enable_hashagg = on 289 #enable_hashjoin = on 290 #enable_indexscan = on 291 #enable_indexonlyscan = on 292 #enable_material = on 293 #enable_mergejoin = on 294 #enable_nestloop = on 295 #enable_seqscan = on 296 #enable_sort = on 297 #enable_tidscan = on 298 299 # - Planner Cost Constants - 300 301 #seq_page_cost = 1.0 # measured on an arbitrary scale 302 #random_page_cost = 4.0 # same scale as above 303 #cpu_tuple_cost = 0.01 # same scale as above 304 #cpu_index_tuple_cost = 0.005 # same scale as above 305 #cpu_operator_cost = 0.0025 # same scale as above 306 #parallel_tuple_cost = 0.1 # same scale as above 307 #parallel_setup_cost = 1000.0 # same scale as above 308 #min_parallel_relation_size = 8MB 309 #effective_cache_size = 4GB 310 311 # - Genetic Query Optimizer - 312 313 #geqo = on 314 #geqo_threshold = 12 315 #geqo_effort = 5 # range 1-10 316 #geqo_pool_size = 0 # selects default based on effort 317 #geqo_generations = 0 # selects default based on effort 318 #geqo_selection_bias = 2.0 # range 1.5-2.0 319 #geqo_seed = 0.0 # range 0.0-1.0 320 321 # - Other Planner Options - 322 323 #default_statistics_target = 100 # range 1-10000 324 #constraint_exclusion = partition # on, off, or partition 325 #cursor_tuple_fraction = 0.1 # range 0.0-1.0 326 #from_collapse_limit = 8 327 #join_collapse_limit = 8 # 1 disables collapsing of explicit 328 # JOIN clauses 329 #force_parallel_mode = off 330 331 332 #------------------------------------------------------------------------------ 333 # ERROR REPORTING AND LOGGING 334 #------------------------------------------------------------------------------ 335 336 # - Where to Log - 337 338 #log_destination = 'stderr' # Valid values are combinations of 339 # stderr, csvlog, syslog, and eventlog, 340 # depending on platform. csvlog 341 # requires logging_collector to be on. 342 343 # This is used when logging to stderr: 344 #logging_collector = off # Enable capturing of stderr and csvlog 345 # into log files. Required to be on for 346 # csvlogs. 347 # (change requires restart) 348 349 # These are only used if logging_collector is on: 350 #log_directory = 'pg_log' # directory where log files are written, 351 # can be absolute or relative to PGDATA 352 #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, 353 # can include strftime() escapes 354 #log_file_mode = 0600 # creation mode for log files, 355 # begin with 0 to use octal notation 356 #log_truncate_on_rotation = off # If on, an existing log file with the 357 # same name as the new log file will be 358 # truncated rather than appended to. 359 # But such truncation only occurs on 360 # time-driven rotation, not on restarts 361 # or size-driven rotation. Default is 362 # off, meaning append to existing files 363 # in all cases. 364 #log_rotation_age = 1d # Automatic rotation of logfiles will 365 # happen after that time. 0 disables. 366 #log_rotation_size = 10MB # Automatic rotation of logfiles will 367 # happen after that much log output. 368 # 0 disables. 369 370 # These are relevant when logging to syslog: 371 #syslog_facility = 'LOCAL0' 372 #syslog_ident = 'postgres' 373 #syslog_sequence_numbers = on 374 #syslog_split_messages = on 375 376 # This is only relevant when logging to eventlog (win32): 377 # (change requires restart) 378 #event_source = 'PostgreSQL' 379 380 # - When to Log - 381 382 #log_min_messages = warning # values in order of decreasing detail: 383 # debug5 384 # debug4 385 # debug3 386 # debug2 387 # debug1 388 # info 389 # notice 390 # warning 391 # error 392 # log 393 # fatal 394 # panic 395 396 #log_min_error_statement = error # values in order of decreasing detail: 397 # debug5 398 # debug4 399 # debug3 400 # debug2 401 # debug1 402 # info 403 # notice 404 # warning 405 # error 406 # log 407 # fatal 408 # panic (effectively off) 409 410 #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements 411 # and their durations, > 0 logs only 412 # statements running at least this number 413 # of milliseconds 414 415 416 # - What to Log - 417 418 #debug_print_parse = off 419 #debug_print_rewritten = off 420 #debug_print_plan = off 421 #debug_pretty_print = on 422 #log_checkpoints = off 423 #log_connections = off 424 #log_disconnections = off 425 #log_duration = off 426 #log_error_verbosity = default # terse, default, or verbose messages 427 #log_hostname = off 428 #log_line_prefix = '' # special values: 429 # %a = application name 430 # %u = user name 431 # %d = database name 432 # %r = remote host and port 433 # %h = remote host 434 # %p = process ID 435 # %t = timestamp without milliseconds 436 # %m = timestamp with milliseconds 437 # %n = timestamp with milliseconds (as a Unix epoch) 438 # %i = command tag 439 # %e = SQL state 440 # %c = session ID 441 # %l = session line number 442 # %s = session start timestamp 443 # %v = virtual transaction ID 444 # %x = transaction ID (0 if none) 445 # %q = stop here in non-session 446 # processes 447 # %% = '%' 448 # e.g. '<%u%%%d> ' 449 #log_lock_waits = off # log lock waits >= deadlock_timeout 450 #log_statement = 'none' # none, ddl, mod, all 451 #log_replication_commands = off 452 #log_temp_files = -1 # log temporary files equal or larger 453 # than the specified size in kilobytes; 454 # -1 disables, 0 logs all temp files 455 log_timezone = 'Etc/UTC' 456 457 458 # - Process Title - 459 460 #cluster_name = '' # added to process titles if nonempty 461 # (change requires restart) 462 #update_process_title = on 463 464 465 #------------------------------------------------------------------------------ 466 # RUNTIME STATISTICS 467 #------------------------------------------------------------------------------ 468 469 # - Query/Index Statistics Collector - 470 471 #track_activities = on 472 #track_counts = on 473 #track_io_timing = off 474 #track_functions = none # none, pl, all 475 #track_activity_query_size = 1024 # (change requires restart) 476 #stats_temp_directory = 'pg_stat_tmp' 477 478 479 # - Statistics Monitoring - 480 481 #log_parser_stats = off 482 #log_planner_stats = off 483 #log_executor_stats = off 484 #log_statement_stats = off 485 486 487 #------------------------------------------------------------------------------ 488 # AUTOVACUUM PARAMETERS 489 #------------------------------------------------------------------------------ 490 491 #autovacuum = on # Enable autovacuum subprocess? 'on' 492 # requires track_counts to also be on. 493 #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and 494 # their durations, > 0 logs only 495 # actions running at least this number 496 # of milliseconds. 497 #autovacuum_max_workers = 3 # max number of autovacuum subprocesses 498 # (change requires restart) 499 #autovacuum_naptime = 1min # time between autovacuum runs 500 #autovacuum_vacuum_threshold = 50 # min number of row updates before 501 # vacuum 502 #autovacuum_analyze_threshold = 50 # min number of row updates before 503 # analyze 504 #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum 505 #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze 506 #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum 507 # (change requires restart) 508 #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age 509 # before forced vacuum 510 # (change requires restart) 511 #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for 512 # autovacuum, in milliseconds; 513 # -1 means use vacuum_cost_delay 514 #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for 515 # autovacuum, -1 means use 516 # vacuum_cost_limit 517 518 519 #------------------------------------------------------------------------------ 520 # CLIENT CONNECTION DEFAULTS 521 #------------------------------------------------------------------------------ 522 523 # - Statement Behavior - 524 525 #client_min_messages = notice # values in order of decreasing detail: 526 # debug5 527 # debug4 528 # debug3 529 # debug2 530 # debug1 531 # log 532 # notice 533 # warning 534 # error 535 #search_path = '"$user", public' # schema names 536 #default_tablespace = '' # a tablespace name, '' uses the default 537 #temp_tablespaces = '' # a list of tablespace names, '' uses 538 # only default tablespace 539 #check_function_bodies = on 540 #default_transaction_isolation = 'read committed' 541 #default_transaction_read_only = off 542 #default_transaction_deferrable = off 543 #session_replication_role = 'origin' 544 #statement_timeout = 0 # in milliseconds, 0 is disabled 545 #lock_timeout = 0 # in milliseconds, 0 is disabled 546 #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled 547 #vacuum_freeze_min_age = 50000000 548 #vacuum_freeze_table_age = 150000000 549 #vacuum_multixact_freeze_min_age = 5000000 550 #vacuum_multixact_freeze_table_age = 150000000 551 #bytea_output = 'hex' # hex, escape 552 #xmlbinary = 'base64' 553 #xmloption = 'content' 554 #gin_fuzzy_search_limit = 0 555 #gin_pending_list_limit = 4MB 556 557 # - Locale and Formatting - 558 559 datestyle = 'iso, mdy' 560 #intervalstyle = 'postgres' 561 timezone = 'Etc/UTC' 562 #timezone_abbreviations = 'Default' # Select the set of available time zone 563 # abbreviations. Currently, there are 564 # Default 565 # Australia (historical usage) 566 # India 567 # You can create your own file in 568 # share/timezonesets/. 569 #extra_float_digits = 0 # min -15, max 3 570 #client_encoding = sql_ascii # actually, defaults to database 571 # encoding 572 573 # These settings are initialized by initdb, but they can be changed. 574 lc_messages = 'en_US.utf8' # locale for system error message 575 # strings 576 lc_monetary = 'en_US.utf8' # locale for monetary formatting 577 lc_numeric = 'en_US.utf8' # locale for number formatting 578 lc_time = 'en_US.utf8' # locale for time formatting 579 580 # default configuration for text search 581 default_text_search_config = 'pg_catalog.english' 582 583 # - Other Defaults - 584 585 #dynamic_library_path = '$libdir' 586 #extension_destdir = '' # prepend path when loading extensions 587 # and shared objects (added by Debian) 588 #local_preload_libraries = '' 589 #session_preload_libraries = '' 590 591 592 #------------------------------------------------------------------------------ 593 # LOCK MANAGEMENT 594 #------------------------------------------------------------------------------ 595 596 #deadlock_timeout = 1s 597 #max_locks_per_transaction = 64 # min 10 598 # (change requires restart) 599 #max_pred_locks_per_transaction = 64 # min 10 600 # (change requires restart) 601 602 603 #------------------------------------------------------------------------------ 604 # VERSION/PLATFORM COMPATIBILITY 605 #------------------------------------------------------------------------------ 606 607 # - Previous PostgreSQL Versions - 608 609 #array_nulls = on 610 #backslash_quote = safe_encoding # on, off, or safe_encoding 611 #default_with_oids = off 612 #escape_string_warning = on 613 #lo_compat_privileges = off 614 #operator_precedence_warning = off 615 #quote_all_identifiers = off 616 #sql_inheritance = on 617 #standard_conforming_strings = on 618 #synchronize_seqscans = on 619 620 # - Other Platforms and Clients - 621 622 #transform_null_equals = off 623 624 625 #------------------------------------------------------------------------------ 626 # ERROR HANDLING 627 #------------------------------------------------------------------------------ 628 629 #exit_on_error = off # terminate session on any error? 630 #restart_after_crash = on # reinitialize after backend crash? 631 #data_sync_retry = off # retry or panic on failure to fsync 632 # data? 633 # (change requires restart) 634 635 636 #------------------------------------------------------------------------------ 637 # CONFIG FILE INCLUDES 638 #------------------------------------------------------------------------------ 639 640 # These options allow settings to be loaded from files other than the 641 # default postgresql.conf. Note that these are directives, not variable 642 # assignments, so they can usefully be given more than once. 643 644 include_dir = '/etc/postgresql/conf.d' # include files ending in '.conf' from 645 # a directory, e.g., 'conf.d' 646 #include_if_exists = '...' # include file only if it exists 647 #include = '...' # include file 648 649 650 #------------------------------------------------------------------------------ 651 # CUSTOMIZED OPTIONS 652 #------------------------------------------------------------------------------ 653 654 # Add settings for extensions here