↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Documentation / Storage Parameters / TOAST tables

toast.vacuum_truncate

TOAST vacuum_truncate

Per-table value for vacuum_truncate parameter. The TRUNCATE parameter of VACUUM , if specified, overrides the value of this option.

Reading PostgreSQL 18.6.

Description

Per-table value for vacuum_truncate parameter. The TRUNCATE parameter of VACUUM , if specified, overrides the value of this option.

Applies to
TOAST tables
Value type
boolean

Usage

WITH (toast.vacuum_truncate = value)

TOAST inheritance

This option applies to the associated TOAST table. Set it with the toast. prefix in WITH or ALTER TABLE SET. An unset TOAST option inherits the corresponding explicitly set parent-table option.

The manual describes table and TOAST forms together. Autoanalyze does not apply to TOAST tables; only explicitly documented toast. forms are listed here.

Common table storage rules

The WITH clause can specify storage parameters for tables, and for indexes associated with a UNIQUE , PRIMARY KEY , or EXCLUDE constraint. Storage parameters for indexes are documented in CREATE INDEX . The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with toast. , which controls the behavior of the table's secondary TOAST table, if any (see Section 66.2 for more information about TOAST). If a table parameter value is set and the equivalent toast. parameter is not, the TOAST table will use the table's parameter value. Specifying these parameters for partitioned tables is not supported, but you may specify them for individual leaf partitions.

Materialized views

This clause specifies optional storage parameters for the new materialized view; see Storage Parameters in the CREATE TABLE documentation for more information. All parameters supported for CREATE TABLE are also supported for CREATE MATERIALIZED VIEW . See CREATE TABLE for more information.

Related global parameter: vacuum_truncate

The following same-version GUC definition explains its purpose and units. Global defaults and activation rules describe the GUC; the relation-option override rules remain those above.

Enables or disables vacuum to try to truncate off any empty pages at the end of the table. The default value is true . If true , VACUUM and autovacuum do the truncation and the disk space for the truncated pages is returned to the operating system. Note that the truncation requires an ACCESS EXCLUSIVE lock on the table. The TRUNCATE parameter of VACUUM , if specified, overrides the value of this parameter. The setting can also be overridden for individual tables by changing table storage parameters.

Related entries

Documentation and source

Source build
Version
18.6
Build
Local English manual 18.6
Source fingerprint
eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744

Related entries

Back to Storage Parameters · Recorded in PostgreSQL 12 through 20; the first sample is not necessarily its introduction.