Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur
Tom Lane <tgl@sss.pgh.pa.us>
Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur only if at least N other backends currently have open transactions. This is not a great deal of intelligence about whether a delay might be profitable ... but it beats no intelligence at all. Note that the default COMMIT_DELAY is still zero --- this new code does nothing unless that setting is changed. Also, mark ENABLEFSYNC as a system-wide setting. It's no longer safe to allow that to be set per-backend, since we may be relying on some other backend's fsync to have synced the WAL log.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/wal.sgml | modified | +8 −5 |
| src/backend/access/transam/xact.c | modified | +14 −8 |
| src/backend/access/transam/xlog.c | modified | +1 −3 |
| src/backend/storage/ipc/sinval.c | modified | +47 −6 |
| src/backend/utils/misc/guc.c | modified | +7 −3 |
| src/backend/utils/misc/postgresql.conf.sample | modified | +2 −1 |
| src/bin/psql/tab-complete.c | modified | +2 −1 |
| src/include/access/xlog.h | modified | +6 −1 |
| src/include/storage/proc.h | modified | +5 −1 |
| src/include/storage/sinval.h | modified | +2 −2 |