运维联盟俱乐部

 找回密码
 立即注册
查看: 2333|回复: 0

pg参考之postgresql.conf

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-5-28 15:02:58 | 显示全部楼层 |阅读模式
    1. # -----------------------------
    2. # PostgreSQL configuration file
    3. # -----------------------------
    4. #
    5. # This file consists of lines of the form:
    6. #
    7. #   name = value
    8. #
    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.
    12. #
    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.
    16. #
    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.
    22. #
    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.
    26. #
    27. # Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
    28. #                MB = megabytes                     s   = seconds
    29. #                GB = gigabytes                     min = minutes
    30. #                TB = terabytes                     h   = hours
    31. #                                                   d   = days


    32. #------------------------------------------------------------------------------
    33. # FILE LOCATIONS
    34. #------------------------------------------------------------------------------

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

    37. #data_directory = 'ConfigDir'           # use data in another directory
    38.                                         # (change requires restart)
    39. #hba_file = 'ConfigDir/pg_hba.conf'     # host-based authentication file
    40.                                         # (change requires restart)
    41. #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
    42.                                         # (change requires restart)

    43. # If external_pid_file is not explicitly set, no extra PID file is written.
    44. #external_pid_file = ''                 # write an extra PID file
    45.                                         # (change requires restart)


    46. #------------------------------------------------------------------------------
    47. # CONNECTIONS AND AUTHENTICATION
    48. #------------------------------------------------------------------------------

    49. # - Connection Settings -

    50. listen_addresses = '*'          # what IP address(es) to listen on;
    51.                                         # comma-separated list of addresses;
    52.                                         # defaults to 'localhost'; use '*' for all
    53.                                         # (change requires restart)
    54. #port = 5432                            # (change requires restart)
    55. max_connections = 100                   # (change requires restart)
    56. #superuser_reserved_connections = 3     # (change requires restart)
    57. #unix_socket_directories = '/tmp'       # comma-separated list of directories
    58.                                         # (change requires restart)
    59. #unix_socket_group = ''                 # (change requires restart)
    60. #unix_socket_permissions = 0777         # begin with 0 to use octal notation
    61.                                         # (change requires restart)
    62. #bonjour = off                          # advertise server via Bonjour
    63.                                         # (change requires restart)
    64. #bonjour_name = ''                      # defaults to the computer name
    65.                                         # (change requires restart)

    66. # - TCP settings -
    67. # see "man 7 tcp" for details

    68. #tcp_keepalives_idle = 0                # TCP_KEEPIDLE, in seconds;
    69.                                         # 0 selects the system default
    70. #tcp_keepalives_interval = 0            # TCP_KEEPINTVL, in seconds;
    71.                                         # 0 selects the system default
    72. #tcp_keepalives_count = 0               # TCP_KEEPCNT;
    73.                                         # 0 selects the system default
    74. #tcp_user_timeout = 0                   # TCP_USER_TIMEOUT, in milliseconds;
    75.                                         # 0 selects the system default

    76. # - Authentication -

    77. #authentication_timeout = 1min          # 1s-600s
    78. #password_encryption = md5              # md5 or scram-sha-256
    79. #db_user_namespace = off

    80. # GSSAPI using Kerberos
    81. #krb_server_keyfile = ''
    82. #krb_caseins_users = off

    83. # - SSL -

    84. #ssl = off
    85. #ssl_ca_file = ''
    86. #ssl_cert_file = 'server.crt'
    87. #ssl_crl_file = ''
    88. #ssl_key_file = 'server.key'
    89. #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
    90. #ssl_prefer_server_ciphers = on
    91. #ssl_ecdh_curve = 'prime256v1'
    92. #ssl_min_protocol_version = 'TLSv1'
    93. #ssl_max_protocol_version = ''
    94. #ssl_dh_params_file = ''
    95. #ssl_passphrase_command = ''
    96. #ssl_passphrase_command_supports_reload = off


    97. #------------------------------------------------------------------------------
    98. # RESOURCE USAGE (except WAL)
    99. #------------------------------------------------------------------------------

    100. # - Memory -

    101. shared_buffers = 128MB                  # min 128kB
    102.                                         # (change requires restart)
    103. #huge_pages = try                       # on, off, or try
    104.                                         # (change requires restart)
    105. #temp_buffers = 8MB                     # min 800kB
    106. #max_prepared_transactions = 0          # zero disables the feature
    107.                                         # (change requires restart)
    108. # Caution: it is not advisable to set max_prepared_transactions nonzero unless
    109. # you actively intend to use prepared transactions.
    110. #work_mem = 4MB                         # min 64kB
    111. #maintenance_work_mem = 64MB            # min 1MB
    112. #autovacuum_work_mem = -1               # min 1MB, or -1 to use maintenance_work_mem
    113. #max_stack_depth = 2MB                  # min 100kB
    114. #shared_memory_type = mmap              # the default is the first option
    115.                                         # supported by the operating system:
    116.                                         #   mmap
    117.                                         #   sysv
    118.                                         #   windows
    119.                                         # (change requires restart)
    120. dynamic_shared_memory_type = posix      # the default is the first option
    121.                                         # supported by the operating system:
    122.                                         #   posix
    123.                                         #   sysv
    124.                                         #   windows
    125.                                         #   mmap
    126.                                         # (change requires restart)

    127. # - Disk -

    128. #temp_file_limit = -1                   # limits per-process temp file space
    129.                                         # in kB, or -1 for no limit

    130. # - Kernel Resources -

    131. #max_files_per_process = 1000           # min 25
    132.                                         # (change requires restart)

    133. # - Cost-Based Vacuum Delay -

    134. #vacuum_cost_delay = 0                  # 0-100 milliseconds (0 disables)
    135. #vacuum_cost_page_hit = 1               # 0-10000 credits
    136. #vacuum_cost_page_miss = 10             # 0-10000 credits
    137. #vacuum_cost_page_dirty = 20            # 0-10000 credits
    138. #vacuum_cost_limit = 200                # 1-10000 credits

    139. # - Background Writer -

    140. #bgwriter_delay = 200ms                 # 10-10000ms between rounds
    141. #bgwriter_lru_maxpages = 100            # max buffers written/round, 0 disables
    142. #bgwriter_lru_multiplier = 2.0          # 0-10.0 multiplier on buffers scanned/round
    143. #bgwriter_flush_after = 512kB           # measured in pages, 0 disables

    144. # - Asynchronous Behavior -

    145. #effective_io_concurrency = 1           # 1-1000; 0 disables prefetching
    146. #max_worker_processes = 8               # (change requires restart)
    147. #max_parallel_maintenance_workers = 2   # taken from max_parallel_workers
    148. #max_parallel_workers_per_gather = 2    # taken from max_parallel_workers
    149. #parallel_leader_participation = on
    150. #max_parallel_workers = 8               # maximum number of max_worker_processes that
    151.                                         # can be used in parallel operations
    152. #old_snapshot_threshold = -1            # 1min-60d; -1 disables; 0 is immediate
    153.                                         # (change requires restart)
    154. #backend_flush_after = 0                # measured in pages, 0 disables


    155. #------------------------------------------------------------------------------
    156. # WRITE-AHEAD LOG
    157. #------------------------------------------------------------------------------

    158. # - Settings -

    159. #wal_level = replica                    # minimal, replica, or logical
    160.                                         # (change requires restart)
    161. #fsync = on                             # flush data to disk for crash safety
    162.                                         # (turning this off can cause
    163.                                         # unrecoverable data corruption)
    164. #synchronous_commit = on                # synchronization level;
    165.                                         # off, local, remote_write, remote_apply, or on
    166. #wal_sync_method = fsync                # the default is the first option
    167.                                         # supported by the operating system:
    168.                                         #   open_datasync
    169.                                         #   fdatasync (default on Linux)
    170.                                         #   fsync
    171.                                         #   fsync_writethrough
    172.                                         #   open_sync
    173. #full_page_writes = on                  # recover from partial page writes
    174. #wal_compression = off                  # enable compression of full-page writes
    175. #wal_log_hints = off                    # also do full page writes of non-critical updates
    176.                                         # (change requires restart)
    177. #wal_init_zero = on                     # zero-fill new WAL files
    178. #wal_recycle = on                       # recycle WAL files
    179. #wal_buffers = -1                       # min 32kB, -1 sets based on shared_buffers
    180.                                         # (change requires restart)
    181. #wal_writer_delay = 200ms               # 1-10000 milliseconds
    182. #wal_writer_flush_after = 1MB           # measured in pages, 0 disables

    183. #commit_delay = 0                       # range 0-100000, in microseconds
    184. #commit_siblings = 5                    # range 1-1000

    185. # - Checkpoints -

    186. #checkpoint_timeout = 5min              # range 30s-1d
    187. max_wal_size = 1GB
    188. min_wal_size = 80MB
    189. #checkpoint_completion_target = 0.5     # checkpoint target duration, 0.0 - 1.0
    190. #checkpoint_flush_after = 256kB         # measured in pages, 0 disables
    191. #checkpoint_warning = 30s               # 0 disables

    192. # - Archiving -

    193. #archive_mode = off             # enables archiving; off, on, or always
    194.                                 # (change requires restart)
    195. #archive_command = ''           # command to use to archive a logfile segment
    196.                                 # placeholders: %p = path of file to archive
    197.                                 #               %f = file name only
    198.                                 # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
    199. #archive_timeout = 0            # force a logfile segment switch after this
    200.                                 # number of seconds; 0 disables

    201. # - Archive Recovery -

    202. # These are only used in recovery mode.

    203. #restore_command = ''           # command to use to restore an archived logfile segment
    204.                                 # placeholders: %p = path of file to restore
    205.                                 #               %f = file name only
    206.                                 # e.g. 'cp /mnt/server/archivedir/%f %p'
    207.                                 # (change requires restart)
    208. #archive_cleanup_command = ''   # command to execute at every restartpoint
    209. #recovery_end_command = ''      # command to execute at completion of recovery

    210. # - Recovery Target -

    211. # Set these only when performing a targeted recovery.

    212. #recovery_target = ''           # 'immediate' to end recovery as soon as a
    213.                                 # consistent state is reached
    214.                                 # (change requires restart)
    215. #recovery_target_name = ''      # the named restore point to which recovery will proceed
    216.                                 # (change requires restart)
    217. #recovery_target_time = ''      # the time stamp up to which recovery will proceed
    218.                                 # (change requires restart)
    219. #recovery_target_xid = ''       # the transaction ID up to which recovery will proceed
    220.                                 # (change requires restart)
    221. #recovery_target_lsn = ''       # the WAL LSN up to which recovery will proceed
    222.                                 # (change requires restart)
    223. #recovery_target_inclusive = on # Specifies whether to stop:
    224.                                 # just after the specified recovery target (on)
    225.                                 # just before the recovery target (off)
    226.                                 # (change requires restart)
    227. #recovery_target_timeline = 'latest'    # 'current', 'latest', or timeline ID
    228.                                 # (change requires restart)
    229. #recovery_target_action = 'pause'       # 'pause', 'promote', 'shutdown'
    230.                                 # (change requires restart)


    231. #------------------------------------------------------------------------------
    232. # REPLICATION
    233. #------------------------------------------------------------------------------

    234. # - Sending Servers -

    235. # Set these on the master and on any standby that will send replication data.

    236. #max_wal_senders = 10           # max number of walsender processes
    237.                                 # (change requires restart)
    238. #wal_keep_segments = 0          # in logfile segments; 0 disables
    239. #wal_sender_timeout = 60s       # in milliseconds; 0 disables

    240. #max_replication_slots = 10     # max number of replication slots
    241.                                 # (change requires restart)
    242. #track_commit_timestamp = off   # collect timestamp of transaction commit
    243.                                 # (change requires restart)

    244. # - Master Server -

    245. # These settings are ignored on a standby server.

    246. #synchronous_standby_names = '' # standby servers that provide sync rep
    247.                                 # method to choose sync standbys, number of sync standbys,
    248.                                 # and comma-separated list of application_name
    249.                                 # from standby(s); '*' = all
    250. #vacuum_defer_cleanup_age = 0   # number of xacts by which cleanup is delayed

    251. # - Standby Servers -

    252. # These settings are ignored on a master server.

    253. #primary_conninfo = ''                  # connection string to sending server
    254.                                         # (change requires restart)
    255. #primary_slot_name = ''                 # replication slot on sending server
    256.                                         # (change requires restart)
    257. #promote_trigger_file = ''              # file name whose presence ends recovery
    258. #hot_standby = on                       # "off" disallows queries during recovery
    259.                                         # (change requires restart)
    260. #max_standby_archive_delay = 30s        # max delay before canceling queries
    261.                                         # when reading WAL from archive;
    262.                                         # -1 allows indefinite delay
    263. #max_standby_streaming_delay = 30s      # max delay before canceling queries
    264.                                         # when reading streaming WAL;
    265.                                         # -1 allows indefinite delay
    266. #wal_receiver_status_interval = 10s     # send replies at least this often
    267.                                         # 0 disables
    268. #hot_standby_feedback = off             # send info from standby to prevent
    269.                                         # query conflicts
    270. #wal_receiver_timeout = 60s             # time that receiver waits for
    271.                                         # communication from master
    272.                                         # in milliseconds; 0 disables
    273. #wal_retrieve_retry_interval = 5s       # time to wait before retrying to
    274.                                         # retrieve WAL after a failed attempt
    275. #recovery_min_apply_delay = 0           # minimum delay for applying changes during recovery

    276. # - Subscribers -

    277. # These settings are ignored on a publisher.

    278. #max_logical_replication_workers = 4    # taken from max_worker_processes
    279.                                         # (change requires restart)
    280. #max_sync_workers_per_subscription = 2  # taken from max_logical_replication_workers


    281. #------------------------------------------------------------------------------
    282. # QUERY TUNING
    283. #------------------------------------------------------------------------------

    284. # - Planner Method Configuration -

    285. #enable_bitmapscan = on
    286. #enable_hashagg = on
    287. #enable_hashjoin = on
    288. #enable_indexscan = on
    289. #enable_indexonlyscan = on
    290. #enable_material = on
    291. #enable_mergejoin = on
    292. #enable_nestloop = on
    293. #enable_parallel_append = on
    294. #enable_seqscan = on
    295. #enable_sort = on
    296. #enable_tidscan = on
    297. #enable_partitionwise_join = off
    298. #enable_partitionwise_aggregate = off
    299. #enable_parallel_hash = on
    300. #enable_partition_pruning = on

    301. # - Planner Cost Constants -

    302. #seq_page_cost = 1.0                    # measured on an arbitrary scale
    303. #random_page_cost = 4.0                 # same scale as above
    304. #cpu_tuple_cost = 0.01                  # same scale as above
    305. #cpu_index_tuple_cost = 0.005           # same scale as above
    306. #cpu_operator_cost = 0.0025             # same scale as above
    307. #parallel_tuple_cost = 0.1              # same scale as above
    308. #parallel_setup_cost = 1000.0   # same scale as above

    309. #jit_above_cost = 100000                # perform JIT compilation if available
    310.                                         # and query more expensive than this;
    311.                                         # -1 disables
    312. #jit_inline_above_cost = 500000         # inline small functions if query is
    313.                                         # more expensive than this; -1 disables
    314. #jit_optimize_above_cost = 500000       # use expensive JIT optimizations if
    315.                                         # query is more expensive than this;
    316.                                         # -1 disables

    317. #min_parallel_table_scan_size = 8MB
    318. #min_parallel_index_scan_size = 512kB
    319. #effective_cache_size = 4GB

    320. # - Genetic Query Optimizer -

    321. #geqo = on
    322. #geqo_threshold = 12
    323. #geqo_effort = 5                        # range 1-10
    324. #geqo_pool_size = 0                     # selects default based on effort
    325. #geqo_generations = 0                   # selects default based on effort
    326. #geqo_selection_bias = 2.0              # range 1.5-2.0
    327. #geqo_seed = 0.0                        # range 0.0-1.0

    328. # - Other Planner Options -

    329. #default_statistics_target = 100        # range 1-10000
    330. #constraint_exclusion = partition       # on, off, or partition
    331. #cursor_tuple_fraction = 0.1            # range 0.0-1.0
    332. #from_collapse_limit = 8
    333. #join_collapse_limit = 8                # 1 disables collapsing of explicit
    334.                                         # JOIN clauses
    335. #force_parallel_mode = off
    336. #jit = on                               # allow JIT compilation
    337. #plan_cache_mode = auto                 # auto, force_generic_plan or
    338.                                         # force_custom_plan


    339. #------------------------------------------------------------------------------
    340. # REPORTING AND LOGGING
    341. #------------------------------------------------------------------------------

    342. # - Where to Log -

    343. log_destination = 'stderr'              # Valid values are combinations of
    344.                                         # stderr, csvlog, syslog, and eventlog,
    345.                                         # depending on platform.  csvlog
    346.                                         # requires logging_collector to be on.

    347. # This is used when logging to stderr:
    348. logging_collector = on          # Enable capturing of stderr and csvlog
    349.                                         # into log files. Required to be on for
    350.                                         # csvlogs.
    351.                                         # (change requires restart)

    352. # These are only used if logging_collector is on:
    353. log_directory = '/app/postgres/12/data'                 # directory where log files are written,
    354.                                                                 # can be absolute or relative to PGDATA
    355. log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
    356.                                         # can include strftime() escapes
    357. log_file_mode = 0600                    # creation mode for log files,
    358.                                         # begin with 0 to use octal notation
    359. log_truncate_on_rotation = off          # If on, an existing log file with the
    360.                                         # same name as the new log file will be
    361.                                         # truncated rather than appended to.
    362.                                         # But such truncation only occurs on
    363.                                         # time-driven rotation, not on restarts
    364.                                         # or size-driven rotation.  Default is
    365.                                         # off, meaning append to existing files
    366.                                         # in all cases.
    367. log_rotation_age = 1d                   # Automatic rotation of logfiles will
    368.                                         # happen after that time.  0 disables.
    369. log_rotation_size = 30MB                # Automatic rotation of logfiles will
    370.                                         # happen after that much log output.
    371.                                         # 0 disables.

    372. # These are relevant when logging to syslog:
    373. #syslog_facility = 'LOCAL0'
    374. #syslog_ident = 'postgres'
    375. #syslog_sequence_numbers = on
    376. #syslog_split_messages = on

    377. # This is only relevant when logging to eventlog (win32):
    378. # (change requires restart)
    379. #event_source = 'PostgreSQL'

    380. # - When to Log -

    381. #log_min_messages = warning             # values in order of decreasing detail:
    382.                                         #   debug5
    383.                                         #   debug4
    384.                                         #   debug3
    385.                                         #   debug2
    386.                                         #   debug1
    387.                                         #   info
    388.                                         #   notice
    389.                                         #   warning
    390.                                         #   error
    391.                                         #   log
    392.                                         #   fatal
    393.                                         #   panic

    394. #log_min_error_statement = error        # values in order of decreasing detail:
    395.                                         #   debug5
    396.                                         #   debug4
    397.                                         #   debug3
    398.                                         #   debug2
    399.                                         #   debug1
    400.                                         #   info
    401.                                         #   notice
    402.                                         #   warning
    403.                                         #   error
    404.                                         #   log
    405.                                         #   fatal
    406.                                         #   panic (effectively off)

    407. #log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements
    408.                                         # and their durations, > 0 logs only
    409.                                         # statements running at least this number
    410.                                         # of milliseconds

    411. #log_transaction_sample_rate = 0.0      # Fraction of transactions whose statements
    412.                                         # are logged regardless of their duration. 1.0 logs all
    413.                                         # statements from all transactions, 0.0 never logs.

    414. # - What to Log -

    415. #debug_print_parse = off
    416. #debug_print_rewritten = off
    417. #debug_print_plan = off
    418. #debug_pretty_print = on
    419. #log_checkpoints = off
    420. #log_connections = off
    421. #log_disconnections = off
    422. #log_duration = off
    423. #log_error_verbosity = default          # terse, default, or verbose messages
    424. #log_hostname = off
    425. #log_line_prefix = '%m [%p] '           # special values:
    426.                                         #   %a = application name
    427.                                         #   %u = user name
    428.                                         #   %d = database name
    429.                                         #   %r = remote host and port
    430.                                         #   %h = remote host
    431.                                         #   %p = process ID
    432.                                         #   %t = timestamp without milliseconds
    433.                                         #   %m = timestamp with milliseconds
    434.                                         #   %n = timestamp with milliseconds (as a Unix epoch)
    435.                                         #   %i = command tag
    436.                                         #   %e = SQL state
    437.                                         #   %c = session ID
    438.                                         #   %l = session line number
    439.                                         #   %s = session start timestamp
    440.                                         #   %v = virtual transaction ID
    441.                                         #   %x = transaction ID (0 if none)
    442.                                         #   %q = stop here in non-session
    443.                                         #        processes
    444.                                         #   %% = '%'
    445.                                         # e.g. '<%u%%%d> '
    446. #log_lock_waits = off                   # log lock waits >= deadlock_timeout
    447. #log_statement = 'none'                 # none, ddl, mod, all
    448. #log_replication_commands = off
    449. #log_temp_files = -1                    # log temporary files equal or larger
    450.                                         # than the specified size in kilobytes;
    451.                                         # -1 disables, 0 logs all temp files
    452. log_timezone = 'Asia/Shanghai'

    453. #------------------------------------------------------------------------------
    454. # PROCESS TITLE
    455. #------------------------------------------------------------------------------

    456. #cluster_name = ''                      # added to process titles if nonempty
    457.                                         # (change requires restart)
    458. #update_process_title = on


    459. #------------------------------------------------------------------------------
    460. # STATISTICS
    461. #------------------------------------------------------------------------------

    462. # - Query and Index Statistics Collector -

    463. #track_activities = on
    464. #track_counts = on
    465. #track_io_timing = off
    466. #track_functions = none                 # none, pl, all
    467. #track_activity_query_size = 1024       # (change requires restart)
    468. #stats_temp_directory = 'pg_stat_tmp'


    469. # - Monitoring -

    470. #log_parser_stats = off
    471. #log_planner_stats = off
    472. #log_executor_stats = off
    473. #log_statement_stats = off


    474. #------------------------------------------------------------------------------
    475. # AUTOVACUUM
    476. #------------------------------------------------------------------------------

    477. #autovacuum = on                        # Enable autovacuum subprocess?  'on'
    478.                                         # requires track_counts to also be on.
    479. #log_autovacuum_min_duration = -1       # -1 disables, 0 logs all actions and
    480.                                         # their durations, > 0 logs only
    481.                                         # actions running at least this number
    482.                                         # of milliseconds.
    483. #autovacuum_max_workers = 3             # max number of autovacuum subprocesses
    484.                                         # (change requires restart)
    485. #autovacuum_naptime = 1min              # time between autovacuum runs
    486. #autovacuum_vacuum_threshold = 50       # min number of row updates before
    487.                                         # vacuum
    488. #autovacuum_analyze_threshold = 50      # min number of row updates before
    489.                                         # analyze
    490. #autovacuum_vacuum_scale_factor = 0.2   # fraction of table size before vacuum
    491. #autovacuum_analyze_scale_factor = 0.1  # fraction of table size before analyze
    492. #autovacuum_freeze_max_age = 200000000  # maximum XID age before forced vacuum
    493.                                         # (change requires restart)
    494. #autovacuum_multixact_freeze_max_age = 400000000        # maximum multixact age
    495.                                         # before forced vacuum
    496.                                         # (change requires restart)
    497. #autovacuum_vacuum_cost_delay = 2ms     # default vacuum cost delay for
    498.                                         # autovacuum, in milliseconds;
    499.                                         # -1 means use vacuum_cost_delay
    500. #autovacuum_vacuum_cost_limit = -1      # default vacuum cost limit for
    501.                                         # autovacuum, -1 means use
    502.                                         # vacuum_cost_limit


    503. #------------------------------------------------------------------------------
    504. # CLIENT CONNECTION DEFAULTS
    505. #------------------------------------------------------------------------------

    506. # - Statement Behavior -

    507. #client_min_messages = notice           # values in order of decreasing detail:
    508.                                         #   debug5
    509.                                         #   debug4
    510.                                         #   debug3
    511.                                         #   debug2
    512.                                         #   debug1
    513.                                         #   log
    514.                                         #   notice
    515.                                         #   warning
    516.                                         #   error
    517. #search_path = '"$user", public'        # schema names
    518. #row_security = on
    519. #default_tablespace = ''                # a tablespace name, '' uses the default
    520. #temp_tablespaces = ''                  # a list of tablespace names, '' uses
    521.                                         # only default tablespace
    522. #default_table_access_method = 'heap'
    523. #check_function_bodies = on
    524. #default_transaction_isolation = 'read committed'
    525. #default_transaction_read_only = off
    526. #default_transaction_deferrable = off
    527. #session_replication_role = 'origin'
    528. #statement_timeout = 0                  # in milliseconds, 0 is disabled
    529. #lock_timeout = 0                       # in milliseconds, 0 is disabled
    530. #idle_in_transaction_session_timeout = 0        # in milliseconds, 0 is disabled
    531. #vacuum_freeze_min_age = 50000000
    532. #vacuum_freeze_table_age = 150000000
    533. #vacuum_multixact_freeze_min_age = 5000000
    534. #vacuum_multixact_freeze_table_age = 150000000
    535. #vacuum_cleanup_index_scale_factor = 0.1        # fraction of total number of tuples
    536.                                                 # before index cleanup, 0 always performs
    537.                                                 # index cleanup
    538. #bytea_output = 'hex'                   # hex, escape
    539. #xmlbinary = 'base64'
    540. #xmloption = 'content'
    541. #gin_fuzzy_search_limit = 0
    542. #gin_pending_list_limit = 4MB

    543. # - Locale and Formatting -

    544. datestyle = 'iso, mdy'
    545. #intervalstyle = 'postgres'
    546. timezone = 'Asia/Shanghai'
    547. #timezone_abbreviations = 'Default'     # Select the set of available time zone
    548.                                         # abbreviations.  Currently, there are
    549.                                         #   Default
    550.                                         #   Australia (historical usage)
    551.                                         #   India
    552.                                         # You can create your own file in
    553.                                         # share/timezonesets/.
    554. #extra_float_digits = 1                 # min -15, max 3; any value >0 actually
    555.                                         # selects precise output mode
    556. #client_encoding = sql_ascii            # actually, defaults to database
    557.                                         # encoding

    558. # These settings are initialized by initdb, but they can be changed.
    559. lc_messages = 'en_US.UTF-8'                     # locale for system error message
    560.                                         # strings
    561. lc_monetary = 'en_US.UTF-8'                     # locale for monetary formatting
    562. lc_numeric = 'en_US.UTF-8'                      # locale for number formatting
    563. lc_time = 'en_US.UTF-8'                         # locale for time formatting

    564. # default configuration for text search
    565. default_text_search_config = 'pg_catalog.english'

    566. # - Shared Library Preloading -

    567. #shared_preload_libraries = ''  # (change requires restart)
    568. #local_preload_libraries = ''
    569. #session_preload_libraries = ''
    570. #jit_provider = 'llvmjit'               # JIT library to use

    571. # - Other Defaults -

    572. #dynamic_library_path = '$libdir'


    573. #------------------------------------------------------------------------------
    574. # LOCK MANAGEMENT
    575. #------------------------------------------------------------------------------

    576. #deadlock_timeout = 1s
    577. #max_locks_per_transaction = 64         # min 10
    578.                                         # (change requires restart)
    579. #max_pred_locks_per_transaction = 64    # min 10
    580.                                         # (change requires restart)
    581. #max_pred_locks_per_relation = -2       # negative values mean
    582.                                         # (max_pred_locks_per_transaction
    583.                                         #  / -max_pred_locks_per_relation) - 1
    584. #max_pred_locks_per_page = 2            # min 0


    585. #------------------------------------------------------------------------------
    586. # VERSION AND PLATFORM COMPATIBILITY
    587. #------------------------------------------------------------------------------

    588. # - Previous PostgreSQL Versions -

    589. #array_nulls = on
    590. #backslash_quote = safe_encoding        # on, off, or safe_encoding
    591. #escape_string_warning = on
    592. #lo_compat_privileges = off
    593. #operator_precedence_warning = off
    594. #quote_all_identifiers = off
    595. #standard_conforming_strings = on
    596. #synchronize_seqscans = on

    597. # - Other Platforms and Clients -

    598. #transform_null_equals = off


    599. #------------------------------------------------------------------------------
    600. # ERROR HANDLING
    601. #------------------------------------------------------------------------------

    602. #exit_on_error = off                    # terminate session on any error?
    603. #restart_after_crash = on               # reinitialize after backend crash?
    604. #data_sync_retry = off                  # retry or panic on failure to fsync
    605.                                         # data?
    606.                                         # (change requires restart)


    607. #------------------------------------------------------------------------------
    608. # CONFIG FILE INCLUDES
    609. #------------------------------------------------------------------------------

    610. # These options allow settings to be loaded from files other than the
    611. # default postgresql.conf.  Note that these are directives, not variable
    612. # assignments, so they can usefully be given more than once.

    613. #include_dir = '...'                    # include files ending in '.conf' from
    614.                                         # a directory, e.g., 'conf.d'
    615. #include_if_exists = '...'              # include file only if it exists
    616. #include = '...'                        # include file


    617. #------------------------------------------------------------------------------
    618. # CUSTOMIZED OPTIONS
    619. #------------------------------------------------------------------------------

    620. # Add settings for extensions here
    复制代码



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-3 03:20 , Processed in 0.068634 second(s), 32 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表