Skip to main content

Setup for PostgreSQL DBAs

Setup is installing, upgrading and configuring a PostgreSQL server with a sound baseline. It covers package installation, initdb, directory layout, major version upgrades with pg_upgrade or logical replication, and the key postgresql.conf and pg_hba.conf settings. It is the first operational step on the PostgreSQL DBA path.

Stage: Installation and Configuration · Part of the PostgreSQL DBA roadmap · Last reviewed 19 November 2026

What to learn in Setup

Setup interview questions

How do pg_upgrade and logical replication differ for a major version upgrade?

pg_upgrade converts the data directory in place, or with hard links using --link, so downtime is minutes but the service is stopped during it. Logical replication copies data to a new-version server while the old one runs, allowing a short cutover, but needs more setup and has limits on what replicates.

How can you check whether a setting change needs a restart?

Query pg_settings and read the context column: postmaster means a restart is required, sighup means a reload is enough, and user or superuser means it can be set per session. After editing, pg_reload_conf() applies reloadable changes, and pending_restart flags those waiting.

Where Setup fits in the PostgreSQL DBA roadmap

Setup belongs to the Installation and Configuration stage (intermediate level). Get a sane baseline.

Back to the full PostgreSQL DBA roadmap