postgres architecture - ghdrako/doc_snipets GitHub Wiki

Cluster > Catalog > Schema > Table > Columns & Rows

So in both Postgres and the SQL Standard we have this containment hierarchy:

  • A computer may have one cluster or multiple.
  • A database server is a cluster.
  • A cluster has catalogs. ( Catalog = Database )
  • Catalogs have schemas. (Schema = namespace of tables, and security boundary)
  • Schemas have tables.
  • Tables have rows.
  • Rows have values, defined by columns. Those values are the business data your apps and users care about such as person's name, invoice due date, product price, gamer’s high score. The column defines the data type of the values (text, date, number, and so on).

Diagram showing nesting boxes representing how connecting on a port gets you to cluster (a database server) which contains one or more Catalogs (a database) each of which contains one or more Schemas (a namespace) each of which contains tables each of which has rows.

obraz

PostgreSQL Process Architecture

obraz

obraz

obraz

obraz

All the database background tasks are performed by the PostgreSQL Postmaster process. The PostgreSQL server background tasks are: security and access manager, transaction processing manager, locking manager, query processing manager, I/O storage manager, write ahead log (WAL) manager, vacuum, and free space manager.

obraz obraz

The database table data resides in the data directory, in default and non-default locations. For non-default tablespace, a symbolic link is created, which is used during creation of the tablespace.