[prev] 13 [next]

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_xlog

  • 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