DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Client Connection Defaults / Statement Behavior

default_table_access_method

Sets the default table access method for new tables.

  • Default: heap
  • Type: string
  • Applies: Session (any user)

In plain words

PostgreSQL can plug in different table storage engines ("access methods"). The built-in one is heap. This setting picks which one CREATE TABLE uses when you do not say USING ….

For DBAs and operators

Table access methods were introduced in PostgreSQL 12. Core ships only heap; extensions can add others (for example columnar storage). List them with SELECT amname FROM pg_am WHERE amtype = 't'. The value must name an existing table AM.

It also applies to CREATE TABLE AS, SELECT INTO and materialized views. Since PostgreSQL 17, partitioned tables can carry an access method (ALTER TABLE … SET ACCESS METHOD) that new partitions inherit.

Check a table's AM with \d+ table (shows "Access method") or pg_class.relam. Pitfall: restoring a dump made with a non-heap AM into a server without that extension fails; pg_dump --no-table-access-method avoids emitting it.

How to change it

Any user can change it for their session with SET.

See it in context

Page layout

Related parameters

default_tablespace default_toast_compression

All Client Connection Defaults parameters