# track_commit_timestamp

> track_commit_timestamp — Collects transaction commit time. Observed in PG9.5–19 Beta 3; its last measured boot default is off in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Collects transaction commit time.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | Upstream pg_settings type |
| Context | `postmaster` | Requires a server restart |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Replication / Sending Servers | Upstream classification |
| Latest boot value | `off` | off |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.5 |
| Present in | PG9.5–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`73c986adde5d`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=73c986adde5d73a5e2555da9b5c8facedb146dcd) — Keep track of transaction commit timestamps |
| Commit date | 2014-12-03 |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.5–19 Beta 3 | `off` | — | off |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Collects transaction commit time. The value is fixed when the server starts, so changing it requires a restart.

PostgreSQL stores transaction commit timestamps in an auxiliary SLRU so SQL and replication-origin features can query them later. It must be enabled at startup before the history is collected and adds storage/I/O overhead; it cannot reconstruct older timestamps.

Monitor and change track_commit_timestamp together with max_active_replication_origins, max_logical_replication_workers, max_replication_slots. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Size track_commit_timestamp from topology, failover roles, slot/subscription count, and reconnect headroom. Test worst-case primary latency, standby replay, and disk retention before production. |
| OLAP | Read standbys and logical subscribers often see long queries or large transactions. Put explicit bounds on replay/apply and monitor lag, worker saturation, slot restart_lsn, and conflict cancellations. |
| Small nodes | Configure only replication capacity that is actually used. Even a small topology needs bounded timeouts and slot lifecycle; unlimited retention is not reliability. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | `on` | different | `'on'` |
| OLAP | `on` | different | `'on'` |
| CRIT | `on` | different | `'on'` |
| TINY | `on` | different | `'on'` |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.5–19 Beta 3 = on (dcs); OLAP: PG9.5–19 Beta 3 = on (dcs); CRIT: PG9.5–19 Beta 3 = on (dcs); TINY: PG9.5–19 Beta 3 = on (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to make commit-time metadata available for diagnostics and replication workflows; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

## Common pitfalls {#common-pitfalls}

- Changing it on the wrong primary, standby, sender, or subscriber role.
- Watching only configured bytes/time instead of actual lag, slot position, and worker state.
- Failing over to a node that lacks the old primary's capacity or prerequisites.
- Using infinite waits or WAL retention to hide a failed consumer.

## Related parameters {#related-parameters}

[`max_active_replication_origins`](/parameters/max-active-replication-origins/) · [`max_logical_replication_workers`](/parameters/max-logical-replication-workers/) · [`max_replication_slots`](/parameters/max-replication-slots/) · [`idle_replication_slot_timeout`](/parameters/idle-replication-slot-timeout/) · [`max_slot_wal_keep_size`](/parameters/max-slot-wal-keep-size/) · [`max_wal_senders`](/parameters/max-wal-senders/)

## References {#references}

- [PostgreSQL 19 Beta 3 — track_commit_timestamp](https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-TRACK-COMMIT-TIMESTAMP)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
