Recovery in PostgreSQL (cont)
Transaction/logging code is distributed throughout backend.
Core transaction code is in src/backend/access/transam .
Transaction/logging data is written to files in PGDATA/pg_wal
- a number of very large files containing log records
- old files are removed once all txs noted there are completed
- new files added when existing files reach their capacity (16MB)
- number of tx log files varies depending on tx activity
(PGDATA/pg_wal used to be called PGDATA/pg_xlog )
|