CertGrid CertGrid
Configuration·PostgreSQL

PostgreSQL ALTER SYSTEM and postgresql.auto.conf

`SET` lasts one session, `ALTER SYSTEM` writes a file the server owns. Between them they cover every durable change without ever editing a config file by hand.

Configuration Guide 13 of 47 Intermediate

Written against the versions above. `postgresql.auto.conf` is read last, so it overrides every other file. That makes it powerful and makes it the first place to look when a config file appears to be ignored.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

Before you start

  1. Change a setting for one session only

  2. Make a change the server records for you

Official sources