track_commit_timestamp
Requires a restarttuned by pgconfiguratorboolean (on/off)
Records the commit time of each transaction (used by conflict resolution and auditing).
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
When on, PostgreSQL stores the timestamp of every transaction commit, queryable via pg_xact_commit_timestamp(). It's required by some logical-replication conflict-resolution schemes and is occasionally useful for auditing 'when was this row last changed'.
How to tune it
Leave off unless a tool or replication setup specifically needs it — a logical-replication conflict-resolution scheme, or auditing patterns that need 'when did this row last change'. The overhead is small (an extra commit-log directory, pg_commit_ts), but it requires a restart, and existing transactions don't retroactively get a recorded commit time.
FAQ
- Can I query the commit time of a row?
- Roughly. With track_commit_timestamp on, pg_xact_commit_timestamp(xmin) returns the commit time of the transaction that last modified a row. Caveats: it's the *transaction's* commit time, not a per-row timestamp, and it stops being available once that transaction's commit-time record is aged out (you can configure the retention via the pg_commit_ts settings).