{"Entry":{"collection":"guc","key":"default_table_access_method","name":"default_table_access_method","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Statement Behavior","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"11","status":"added","to":"12"}],"content_hash":"85a69281d38dac8a8793ed1457c111de5052d6f8ad5dbe7c76976153ae40c63e","context":"","default_changed_in":[],"default_history":[{"from":"12","to":"19","value":"heap"}],"editorial":{"advice":{"olap":"Benchmark an alternative with representative scans, loads, updates, and maintenance, then scope it to dedicated objects rather than changing the default prematurely.","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.","small":"Use heap. An alternative access method adds operational dependencies and is not a generic remedy for limited hardware."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: default_table_access_method","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-DEFAULT-TABLE-ACCESS-METHOD"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["default_tablespace","temp_tablespaces","default_toast_compression","check_function_bodies","maintenance_work_mem"],"summary":"default_table_access_method is the PostgreSQL setting that defines the default table access method for new tables."},"enumvals":[],"first_version":"12","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.091443+08:00","intro_commit":{"authored_at":"2019-03-06T09:54:38-08:00","discussion":["https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de"],"hash":"8586bf7ed8889f39a59dd99b292014b73be85342","subject":"tableam: introduce table AM infrastructure.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8586bf7ed8889f39a59dd99b292014b73be85342"},"key":"default_table_access_method","last_version":"20","max_val":"","min_val":"","name":"default_table_access_method","position":99,"present_in":["12","13","14","15","16","17","18","19","20"],"short_desc":"This parameter specifies the default table access method to use when creating tables or materialized views if the CREATE command does not explicitly specify an access method, or when SELECT ...","short_desc_zh":"","source_rev":"english-manuals:28e32b5cd0d2427279a645de8105c10684df2415af82dbb9b43ba2fb2eef9e8d","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"default_table_access_method","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"default_table_access_method","SourceRevision":"english-manuals:28e32b5cd0d2427279a645de8105c10684df2415af82dbb9b43ba2fb2eef9e8d","Facts":{"boot_val":"heap","category":"Client Connection Defaults / Statement Behavior","context":"user","description":"This parameter specifies the default table access method to use when creating tables or materialized views if the CREATE command does not explicitly specify an access method, or when SELECT ... INTO is used, which does not allow specifying a table access method. The default is heap.","doc":{"anchor":"GUC-DEFAULT-TABLE-ACCESS-METHOD","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"default_table_access_method","short_desc":"Sets the default table access method for new tables.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-DEFAULT-TABLE-ACCESS-METHOD","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"default_table_access_method","SourceDatabase":"center","Version":"18","Locale":"en","Title":"default_table_access_method","Summary":"This parameter specifies the default table access method to use when creating tables or materialized views if the CREATE command does not explicitly specify an access method, or when SELECT ... INTO is used, which does not allow specifying a table access method. The default is heap.","BodyHTML":"\u003cp\u003eThis parameter specifies the default table access method to use when creating tables or materialized views if the CREATE command does not explicitly specify an access method, or when SELECT ... INTO is used, which does not allow specifying a table access method. The default is heap.\u003c/p\u003e","SourceRevision":"english-manuals:28e32b5cd0d2427279a645de8105c10684df2415af82dbb9b43ba2fb2eef9e8d","ContentHash":"c73636702bec9b2e18636d5d49b800a387eb5e7e19cfc4e85e8246c738665fd5","Payload":{"description":"This parameter specifies the default table access method to use when creating tables or materialized views if the CREATE command does not explicitly specify an access method, or when SELECT ... INTO is used, which does not allow specifying a table access method. The default is heap."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
