Tune it with confidence
What each parameter does, its default, when a change takes effect, and how to tune it safely for production.
Archiving
Asynchronous I/O
Authentication
password_encryption — PostgreSQL Configuration Parameter
Hashing algorithm used when storing passwords.
default: scram-sha-256ssl — PostgreSQL Configuration Parameter
Enables SSL/TLS connections.
default: offssl_min_protocol_version — PostgreSQL Configuration Parameter
Minimum TLS protocol version accepted.
default: TLSv1.2Autovacuum
autovacuum — PostgreSQL Configuration Parameter
Master switch for the autovacuum daemon.
default: onautovacuum_freeze_max_age — PostgreSQL Configuration Parameter
Table age that forces an anti-wraparound autovacuum.
default: 200000000autovacuum_max_workers — PostgreSQL Configuration Parameter
Maximum concurrent autovacuum worker processes.
default: 3autovacuum_naptime — PostgreSQL Configuration Parameter
Delay between autovacuum runs per database.
default: 1minautovacuum_vacuum_cost_delay — PostgreSQL Configuration Parameter
Throttling pause for autovacuum I/O.
default: 2msautovacuum_vacuum_cost_limit — PostgreSQL Configuration Parameter
I/O cost budget before autovacuum sleeps (-1 = use vacuum_cost_limit).
default: -1autovacuum_vacuum_insert_scale_factor — PostgreSQL Configuration Parameter
Insert-driven autovacuum threshold fraction (PG13+).
default: 0.2autovacuum_vacuum_scale_factor — PostgreSQL Configuration Parameter
Fraction of table that must be dead before autovacuum runs.
default: 0.2autovacuum_vacuum_threshold — PostgreSQL Configuration Parameter
Minimum dead tuples before autovacuum considers a table.
default: 50Background Writer
Checkpoints
checkpoint_completion_target — PostgreSQL Configuration Parameter
Fraction of the interval over which to spread checkpoint writes.
default: 0.9checkpoint_timeout — PostgreSQL Configuration Parameter
Maximum time between automatic checkpoints.
default: 5minmax_wal_size — PostgreSQL Configuration Parameter
Soft upper limit of WAL between automatic checkpoints.
default: 1GBmin_wal_size — PostgreSQL Configuration Parameter
WAL kept and recycled rather than removed.
default: 80MBClient Defaults
client_encoding — PostgreSQL Configuration Parameter
Character set used for client communication.
default: UTF8default_transaction_isolation — PostgreSQL Configuration Parameter
Default isolation level for new transactions.
default: read committeddefault_transaction_read_only — PostgreSQL Configuration Parameter
Make new transactions read-only by default.
default: offidle_in_transaction_session_timeout — PostgreSQL Configuration Parameter
Terminate sessions idle inside an open transaction.
default: 0idle_session_timeout — PostgreSQL Configuration Parameter
Terminate sessions idle outside any transaction (PG14+).
default: 0lock_timeout — PostgreSQL Configuration Parameter
Abort a statement waiting too long for a lock.
default: 0search_path — PostgreSQL Configuration Parameter
Schema search order for unqualified names.
default: "$user", publicstatement_timeout — PostgreSQL Configuration Parameter
Abort any statement running longer than this.
default: 0timezone — PostgreSQL Configuration Parameter
Time zone for displaying and interpreting timestamps.
default: GMTConnections
authentication_timeout — PostgreSQL Configuration Parameter
Maximum time to complete client authentication.
default: 1minlisten_addresses — PostgreSQL Configuration Parameter
TCP/IP addresses the server listens on.
default: 'localhost'max_connections — PostgreSQL Configuration Parameter
Maximum number of concurrent client connections.
default: 100port — PostgreSQL Configuration Parameter
TCP port the server listens on.
default: 5432reserved_connections — PostgreSQL Configuration Parameter
Slots reserved for roles with the RESERVED_CONNECTION privilege (PG16+).
default: 0superuser_reserved_connections — PostgreSQL Configuration Parameter
Connection slots reserved for superusers.
default: 3tcp_keepalives_idle — PostgreSQL Configuration Parameter
Idle time before TCP keepalive probes start.
default: 0unix_socket_directories — PostgreSQL Configuration Parameter
Directories for Unix-domain socket files.
default: '/tmp'Error Handling
Locks
deadlock_timeout — PostgreSQL Configuration Parameter
Wait before checking for a deadlock.
default: 1smax_locks_per_transaction — PostgreSQL Configuration Parameter
Average lock slots reserved per transaction.
default: 64max_pred_locks_per_transaction — PostgreSQL Configuration Parameter
Predicate-lock table sizing for SERIALIZABLE.
default: 64Logging
log_autovacuum_min_duration — PostgreSQL Configuration Parameter
Log autovacuum actions that run at least this long.
default: 10minlog_checkpoints — PostgreSQL Configuration Parameter
Log each checkpoint with timing and buffer stats.
default: onlog_line_prefix — PostgreSQL Configuration Parameter
Printf-style prefix on each log line.
default: '%m [%p] 'log_lock_waits — PostgreSQL Configuration Parameter
Log sessions that wait longer than deadlock_timeout for a lock.
default: offlog_min_duration_statement — PostgreSQL Configuration Parameter
Log statements running at least this long.
default: -1log_statement — PostgreSQL Configuration Parameter
Which statement kinds to log (none/ddl/mod/all).
default: nonelog_temp_files — PostgreSQL Configuration Parameter
Log temporary files at least this large.
default: -1logging_collector — PostgreSQL Configuration Parameter
Capture stderr into managed, rotated log files.
default: offMemory
autovacuum_work_mem — PostgreSQL Configuration Parameter
Memory each autovacuum worker may use (-1 = use maintenance_work_mem).
default: -1hash_mem_multiplier — PostgreSQL Configuration Parameter
Multiplier applied to work_mem for hash-based operations.
default: 2.0huge_pages — PostgreSQL Configuration Parameter
Use OS huge pages for shared memory.
default: trymaintenance_work_mem — PostgreSQL Configuration Parameter
Memory for maintenance operations (VACUUM, CREATE INDEX).
default: 64MBmax_prepared_transactions — PostgreSQL Configuration Parameter
Max simultaneous two-phase-commit prepared transactions.
default: 0shared_buffers — PostgreSQL Configuration Parameter
Shared memory used for the buffer cache.
default: 128MBtemp_buffers — PostgreSQL Configuration Parameter
Per-session memory for temporary tables.
default: 8MBwork_mem — PostgreSQL Configuration Parameter
Memory per sort/hash operation before spilling to disk.
default: 4MBParallelism
max_parallel_workers — PostgreSQL Configuration Parameter
Total parallel workers available cluster-wide.
default: 8max_parallel_workers_per_gather — PostgreSQL Configuration Parameter
Max parallel workers a single Gather node can use.
default: 2max_worker_processes — PostgreSQL Configuration Parameter
Total background worker processes the cluster can run.
default: 8Preset
Query Planner
default_statistics_target — PostgreSQL Configuration Parameter
Default sampling detail for ANALYZE statistics.
default: 100effective_cache_size — PostgreSQL Configuration Parameter
Planner's estimate of total cache available (OS + shared_buffers).
default: 4GBeffective_io_concurrency — PostgreSQL Configuration Parameter
Number of concurrent I/O requests the planner assumes (prefetch).
default: 1jit — PostgreSQL Configuration Parameter
Enable Just-In-Time compilation of expressions.
default: onjoin_collapse_limit — PostgreSQL Configuration Parameter
Max FROM items before the planner stops reordering joins.
default: 8random_page_cost — PostgreSQL Configuration Parameter
Planner cost of a non-sequential page fetch.
default: 4.0seq_page_cost — PostgreSQL Configuration Parameter
Planner cost of a sequential page fetch (the baseline).
default: 1.0Replication
hot_standby — PostgreSQL Configuration Parameter
Allow read-only queries on a standby during recovery.
default: onhot_standby_feedback — PostgreSQL Configuration Parameter
Standby tells primary about its oldest snapshot to avoid query conflicts.
default: offmax_replication_slots — PostgreSQL Configuration Parameter
Max replication slots (physical + logical).
default: 10max_standby_streaming_delay — PostgreSQL Configuration Parameter
How long replay waits before canceling a conflicting standby query.
default: 30smax_wal_senders — PostgreSQL Configuration Parameter
Max concurrent WAL sender processes (standbys + base backups).
default: 10primary_conninfo — PostgreSQL Configuration Parameter
Connection string a standby uses to stream from the primary.
default: ''synchronous_standby_names — PostgreSQL Configuration Parameter
Standbys that must confirm commits (synchronous replication).
default: ''wal_keep_size — PostgreSQL Configuration Parameter
Minimum WAL retained for standbys (replaces wal_keep_segments).
default: 0Resource Limits
Statistics
compute_query_id — PostgreSQL Configuration Parameter
Compute a stable query identifier (PG14+).
default: autotrack_activities — PostgreSQL Configuration Parameter
Track the current command of each session.
default: ontrack_io_timing — PostgreSQL Configuration Parameter
Collect timing of block read/write operations.
default: offWAL
fsync — PostgreSQL Configuration Parameter
Force WAL/data changes to durable storage.
default: onfull_page_writes — PostgreSQL Configuration Parameter
Write full page images after a checkpoint to survive torn pages.
default: onsynchronous_commit — PostgreSQL Configuration Parameter
When COMMIT waits for WAL durability / standby confirmation.
default: onwal_buffers — PostgreSQL Configuration Parameter
Shared memory for unwritten WAL.
default: -1wal_compression — PostgreSQL Configuration Parameter
Compress full-page images written to WAL.
default: offwal_level — PostgreSQL Configuration Parameter
Amount of information written to the WAL.
default: replica