andersch.dev

<2025-01-17 Fri>

PostgreSQL

PostgreSQL is an open-source RDBMS that uses and extends SQL. It is ACID compliant, scalable and extensible.

Tools & Config

CLI Tools:

  • psql: interactive SQL shell for connecting to databases, run queries, etc.
  • pg_ctl: Starts & stops the PostgreSQL server
  • createdb / dropdb: Create or remove databases
  • createuser / dropuser: Create or remove users
  • pg_dump / pg_restore: Backup or restore a database

Data and config files:

  • $PGDATA: data directory for storing databases, WAL logs, and config files.
  • postgresql.conf: Main server configuration (ports, logging, memory settings)
  • pg_hba.conf: Controls client authentication

Resources