PostgreSQL Database Architecture

PostgreSQL Architecture Overview

The architecture of Postgresql consists of 3 main components: Postgresql Instance: It consists of background processes, helper processes, and ashared buffer area.The postmaster process manages the instance. An instance can only manage adatabase cluster and its databases (Cluster concept is explained in detail in Storagetopic).More than one instance can run on the same server at PostgreSQL Architecture Overview

Postgresql Memory Structure

When we compare both I/O and OIPS performances, RAM is many times faster than SSD disk. Magnetic disks are also slower than SSD disks. For performance, it is desirable to perform I/O operations on memory as much as possible. Memory structures in Postgresql have different uses and methods. For example, one part (memory structure) is Postgresql Memory Structure

Process Architecture

We can divide the processes into 4 main groups. Note: The Stats collector process is included in the core system with version 15, it is nota separate process. Postgres Process Postgres process in Debian-based Linux (path is different in RHEL-based Linux.) It is the parent process that first opens in the instance and starts other Process Architecture

Storage Structure

We mentioned that the Postgresql architecture consists of 3 main components,memory, process and storage (Database Cluster). We talked about memory andprocesses. Now it’s time for storage.While the term cluster is mostly used in high availability and disaster recovery solutionssuch as active-active cluster, and active-passive cluster, it has a different usage inPostgresql. In Postgresql, a database Storage Structure