Arrange to fsync two-phase-commit state files only during checkpoints;
Tom Lane <tgl@sss.pgh.pa.us>
Arrange to fsync two-phase-commit state files only during checkpoints; given reasonably short lifespans for prepared transactions, this should mean that only a small minority of state files ever need to be fsynced at all. Per discussion with Heikki Linnakangas.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +189 −40 |
| src/backend/access/transam/xact.c | modified | +1 −14 |
| src/backend/access/transam/xlog.c | modified | +3 −1 |
| src/include/access/twophase.h | modified | +4 −3 |