# transaction_deferrable

> transaction_deferrable is the PostgreSQL setting that controls whether PostgreSQL should defer a read-only serializable transaction until it can be executed with no possible serialization failures.
---

> [!NOTE]
> **Fact — official short description:** “Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Client Connection Defaults / Statement Behavior | Upstream classification |
| Latest boot value | `off` | off |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.1 |
| Present in | PG9.1–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`dafaa3efb75c`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=dafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21) — Implement genuine serializable isolation level. |
| Commit date | 2011-02-07 |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

transaction_deferrable controls whether PostgreSQL should defer a read-only serializable transaction until it can be executed with no possible serialization failures. It reflects the current transaction and is meaningful only for a read-only serializable transaction before the snapshot is acquired.

transaction_deferrable is session-settable but represents the current transaction; PostgreSQL restricts changes after the transaction has acquired a snapshot or performed conflicting work.

The default_* variables seed the corresponding transaction_* state. Isolation, read-only status, deferrability, retries, and snapshot lifetime must be designed together.

## Tuning advice {#tuning-advice}

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

| Workload | Guidance |
| --- | --- |
| OLTP | Choose transaction_deferrable for correctness semantics first. Keep the common OLTP path explicit, then override only transactions whose consistency contract justifies different blocking or retry behavior. |
| OLAP | For reporting, consider a read-only transaction and an isolation choice that matches snapshot requirements; use deferrability only with read-only serializable work. |
| Small nodes | Do not change transaction_deferrable as a generic speed tweak. Higher isolation or long snapshots can amplify contention and vacuum pressure on a small node. |
{.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 | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.1–19 Beta 3 unmodified; OLAP: PG9.1–19 Beta 3 unmodified; CRIT: PG9.1–19 Beta 3 unmodified; TINY: PG9.1–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Changing transaction_deferrable in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.
- Changing transaction semantics as a performance experiment and silently weakening an application's consistency contract.
- Letting a pooled session retain transaction-related state because checkout or rollback/reset handling is incomplete.
- Changing transaction_deferrable globally without a rollback plan and a client or operational compatibility test.

## Related parameters {#related-parameters}

[`default_transaction_isolation`](/parameters/default-transaction-isolation/) · [`transaction_isolation`](/parameters/transaction-isolation/) · [`default_transaction_read_only`](/parameters/default-transaction-read-only/) · [`transaction_read_only`](/parameters/transaction-read-only/) · [`default_transaction_deferrable`](/parameters/default-transaction-deferrable/)

## References {#references}

- [PostgreSQL 19 Beta 3 — transaction_deferrable](https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-TRANSACTION-DEFERRABLE)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
