default_table_access_method
Fact — official short description: “Sets the default table access method for new tables.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG12 |
| Present in | PG12–19 Beta 3 |
| Removed in | No |
| Introduction commit | 8586bf7ed888 — tableam: introduce table AM infrastructure. |
| Commit date | 2019-03-06 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG12–19 Beta 3 | heap |
— | heap |
How it works
default_table_access_method sets the default table access method for new tables. It is consulted only when CREATE TABLE, CREATE MATERIALIZED VIEW, or SELECT INTO does not name an access method; existing relations are unchanged.
default_table_access_method is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.
It supplies a default only when SQL omits an explicit choice, so schema migrations, object-level options, privileges, and later ALTER operations can override or outlive it.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep heap unless a production-ready alternative access method has been tested for concurrency, WAL, backup, replication, upgrades, and tooling; name the choice explicitly in critical DDL. |
| OLAP | Benchmark an alternative with representative scans, loads, updates, and maintenance, then scope it to dedicated objects rather than changing the default prematurely. |
| Small nodes | Use heap. An alternative access method adds operational dependencies and is not a generic remedy for limited hardware. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Changing default_table_access_method in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.
- Expecting a changed default to rewrite existing objects or override explicit DDL clauses.
- Ignoring tablespace privileges, installed access methods or compression support, and restore portability.
- Changing default_table_access_method globally without a rollback plan and a client or operational compatibility test.
Related parameters
default_tablespace · temp_tablespaces · default_toast_compression · check_function_bodies · maintenance_work_mem
References
- PostgreSQL 19 Beta 3 — default_table_access_method
- PostgreSQL 19 release notes
- Machine-readable GUC export