PostgreSQL 18 프로세스 구조

PostgreSQL 18 프로세스 구조 An architecture diagram generated by Archify. 클라이언트 · psql, 애플리케이션 · Architecture component 클라이언트 psql, 애플리케이션 Standby · pg_receivewal 등 · Architecture component Standby pg_receivewal 등 postmaster · accept, fork, 자식 감시 · Architecture component postmaster accept, fork, 자식 감시 client backend ×N · 연결 1개 = 프로세스 1개 · Architecture component client backend ×N 연결 1개 = 프로세스 1개 walsender · 복제 연결용 backend · Architecture component walsender 복제 연결용 backend autovacuum launcher · 청소할 DB를 고름 · Architecture component autovacuum launcher 청소할 DB를 고름 autovacuum worker · 필요할 때만 생김 · Architecture component autovacuum worker 필요할 때만 생김 공유 메모리 · shared buffers, WAL buffers, 락 등 · Architecture component · 150MB 공유 메모리 shared buffers, WAL buffers, 락 등 150MB io worker ×3 · PG18 신규, 실제 read 수행 · Architecture component io worker ×3 PG18 신규, 실제 read 수행 background writer · dirty 페이지를 조금씩 · Architecture component background writer dirty 페이지를 조금씩 checkpointer · 주기적으로 모두 flush · Architecture component checkpointer 주기적으로 모두 flush walwriter · WAL buffers를 flush · Architecture component walwriter WAL buffers를 flush 데이터 파일 · $PGDATA/base · Architecture component 데이터 파일 $PGDATA/base WAL 파일 · $PGDATA/pg_wal · Architecture component WAL 파일 $PGDATA/pg_wal archiver · archive_mode=on일 때 · Architecture component archiver archive_mode=on일 때 WAL 보관소 · archive_command 대상 · Architecture component WAL 보관소 archive_command 대상 접속 요청 fork() 이후 쿼리는 backend와 직접 읽기/쓰기 I/O 요청 pread dirty 페이지 write 모든 dirty write + fsync WAL write + fsync WAL 읽기 WAL 스트리밍 worker 요청 fork() 다 쓴 세그먼트 복사