{"Entry":{"collection":"relopts","key":"table-toast-tuple-target","name":"toast_tuple_target","aliases":["table.toast_tuple_target"],"metadata":{"aliases":["table.toast_tuple_target"],"category":"Tables and materialized views","content_hash":"3ee6a42b25990b4954262e804118c7d8ab00440416f5e168b9f7c9f9abdbdbd2","derived_content_hash":"4c24b434dabd232e5e6ac98197b007970b8ac189c9655ed4cc4cd7cbe61a6d7a","imported_at":"2026-09-30T17:44:22.258618+08:00","name":"toast_tuple_target","name_zh":"toast_tuple_target","repair_provenance":{"original_source_revision":"","receipt_sha256":"09101a10c68b69a564a8d1214f13609f92ac7362492aac5a2a3a5901f2ab5042","repair":"wiki-repair-20261023"},"slug":"table-toast-tuple-target","source_rev":"wiki-repair-20261023:7b8c26d3e229dd9ab451156e68e4142b9a2c38c182278d7de8b33d6348ca8047","summary":"The toast_tuple_target specifies the minimum tuple length required before we try to compress and/or move long column values into TOAST tables, and is also the target length we try to reduce the length below once toasting begins. This affects columns marked as External (for move), Main (for compression), or Extended (for both) and applies only to new tuples. There is no effect on existing rows. By default this parameter is set to allow at least 4 tuples per block, which with the default block size will be 2040 bytes. Valid values are between 128 bytes and the (block size - header), by default 8160 bytes. Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. This parameter cannot be set for TOAST tables."}},"Definition":{"Collection":"relopts","Key":"table-toast-tuple-target","SourceDatabase":"center","Version":"18","SourceTable":"relopt","SourceKey":"table-toast-tuple-target","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","Facts":{"description":["The toast_tuple_target specifies the minimum tuple length required before we try to compress and/or move long column values into TOAST tables, and is also the target length we try to reduce the length below once toasting begins. This affects columns marked as External (for move), Main (for compression), or Extended (for both) and applies only to new tuples. There is no effect on existing rows. By default this parameter is set to allow at least 4 tuples per block, which with the default block size will be 2040 bytes. Valid values are between 128 bytes and the (block size - header), by default 8160 bytes. Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. This parameter cannot be set for TOAST tables."],"description_zh":"toast_tuple_target 指定在尝试压缩和/或将长列值移入 TOAST 表之前所需的最小元组长度，同时也是一旦开始 TOAST 化后试图将长度缩减到其以下的目标长度。这会影响标记为 External（用于移动）、Main（用于压缩）或 Extended（用于两者）的列，并且只适用于新元组。对现有行没有影响。默认情况下，该参数被设置为至少允许每个块容纳 4 个元组，在默认块大小下即为 2040 字节。有效值介于 128 字节与（块大小减去页头）之间，默认上限为 8160 字节。对非常短或非常长的行，修改该值可能没有帮助。注意，默认设置通常已经接近最佳，某些情况下设置该参数可能产生负面影响。不能为 TOAST 表设置此参数。","description_zh_html":"\u003cp\u003e\n      toast_tuple_target 指定在尝试压缩和/或将长列值移入\n      TOAST 表之前所需的最小元组长度，同时也是一旦开始 TOAST 化后试图将长度缩减到其以下的目标长度。这会影响标记为 External（用于移动）、Main（用于压缩）或 Extended（用于两者）的列，并且只适用于新元组。对现有行没有影响。默认情况下，该参数被设置为至少允许每个块容纳 4 个元组，在默认块大小下即为\n      2040 字节。有效值介于 128 字节与（块大小减去页头）之间，默认上限为\n      8160 字节。对非常短或非常长的行，修改该值可能没有帮助。注意，默认设置通常已经接近最佳，某些情况下设置该参数可能产生负面影响。不能为 TOAST 表设置此参数。\n     \u003c/p\u003e","facts":[{"label":"Applies to","value":"Tables and materialized views"},{"label":"Value type","value":"integer"}],"related":[{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sections":[{"paragraphs":["This relation-level setting applies to the table or materialized view. Any corresponding global parameter has a separate entry."],"title":"Scope"},{"paragraphs":["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."],"title":"Common table storage rules"},{"paragraphs":["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."],"title":"Materialized views"}],"signature":"WITH (toast_tuple_target = value)","sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-TOAST-TUPLE-TARGET"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-createtable.html","sha256":"c044586c69b191e0f39966b25811a0c70f12fe2bf5e7f640501e53d76ca8f775"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-TOAST-TUPLE-TARGET"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"relopts","Key":"table-toast-tuple-target","SourceDatabase":"center","Version":"18","Locale":"en","Title":"toast_tuple_target","Summary":"The toast_tuple_target specifies the minimum tuple length required before we try to compress and/or move long column values into TOAST tables, and is also the target length we try to reduce the length below once toasting begins. This affects columns marked as External (for move), Main (for compression), or Extended (for both) and applies only to new tuples. There is no effect on existing rows. By default this parameter is set to allow at least 4 tuples per block, which with the default block size will be 2040 bytes. Valid values are between 128 bytes and the (block size - header), by default 8160 bytes. Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. This parameter cannot be set for TOAST tables.","BodyHTML":"\u003cp\u003eThe toast_tuple_target specifies the minimum tuple length required before we try to compress and/or move long column values into TOAST tables, and is also the target length we try to reduce the length below once toasting begins. This affects columns marked as External (for move), Main (for compression), or Extended (for both) and applies only to new tuples. There is no effect on existing rows. By default this parameter is set to allow at least 4 tuples per block, which with the default block size will be 2040 bytes. Valid values are between 128 bytes and the (block size - header), by default 8160 bytes. Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. This parameter cannot be set for TOAST tables.\u003c/p\u003e","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","ContentHash":"2cff6b3dc8ddfc6f0637f4bf5d99750118d62623b0af9e5905f240c1bf6a6932","Payload":{"description":["The toast_tuple_target specifies the minimum tuple length required before we try to compress and/or move long column values into TOAST tables, and is also the target length we try to reduce the length below once toasting begins. This affects columns marked as External (for move), Main (for compression), or Extended (for both) and applies only to new tuples. There is no effect on existing rows. By default this parameter is set to allow at least 4 tuples per block, which with the default block size will be 2040 bytes. Valid values are between 128 bytes and the (block size - header), by default 8160 bytes. Changing this value may not be useful for very short or very long rows. Note that the default setting is often close to optimal, and it is possible that setting this parameter could have negative effects in some cases. This parameter cannot be set for TOAST tables."],"related":[{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"sections":[{"paragraphs":["This relation-level setting applies to the table or materialized view. Any corresponding global parameter has a separate entry."],"title":"Scope"},{"paragraphs":["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."],"title":"Common table storage rules"},{"paragraphs":["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."],"title":"Materialized views"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
