Skip to the content.

PostgreSQL - Setup

Basic Concepts

Installation

See Download PostgreSQL.

Configuration

# /etc/postgresql/16/main/postgresql.conf

#listen_addresses = 'localhost'  # '*' for all
#port = 5432
max_connections = 4096
password_encryption = scram-sha-256  # md5 or scram-sha-256

shared_buffers = 256MB  # 128MB

client_encoding = 'UTF8'
#default_transaction_isolation = 'read committed'
#timezone = 'UTC'
# /etc/postgresql/16/main/pg_hba.conf

host all all 127.0.0.1/32 scram-sha-256

host all all all         scram-sha-256
systemctl enable|disable postgresql
systemctl start|stop|restart|status postgresql