一、整体架构概览
PostgreSQL 采用典型的客户端/服务器架构,由多个进程协同工作。
二、进程结构
2.1 进程概览
# 查看 PostgreSQL 进程
ps aux | grep postgres
# 典型输出:
# postgres 1234 postmaster # 主进程
# postgres 1235 checkpointer # 检查点进程
# postgres 1236 background writer # 后台写进程
# postgres 1237 walwriter # WAL 写进程
# postgres 1238 autovacuum launcher # 自动清理启动器
# postgres 1239 stats collector # 统计收集器
# postgres 1240 logical replication launcher # 逻辑复制启动器
# postgres 1241 postgres: user db [active] # 后端进程
2026/3/20大约 13 分钟