aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-03 04:14:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-03 04:14:26 +0000
commitb3005276eb42bbe9c0975ab8d9aa6f1ebe86850c (patch)
treedcf060fd6f6c114d66e31ceb2634dae3a499aa76 /doc/src
parent4fea0ca8f3f6e46c958aecef1863fc1940f7c6aa (diff)
downloadpostgresql-b3005276eb42bbe9c0975ab8d9aa6f1ebe86850c.tar.gz
postgresql-b3005276eb42bbe9c0975ab8d9aa6f1ebe86850c.zip
Decouple the values of TOAST_TUPLE_THRESHOLD and TOAST_MAX_CHUNK_SIZE.
Add the latter to the values checked in pg_control, since it can't be changed without invalidating toast table content. This commit in itself shouldn't change any behavior, but it lays some necessary groundwork for experimentation with these toast-control numbers. Note: while TOAST_TUPLE_THRESHOLD can now be changed without initdb, some thought still needs to be given to needs_toast_table() in toasting.c before unleashing random changes.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/storage.sgml15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8a2e7929e62..1973a5b90c3 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.15 2007/03/02 00:48:44 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.16 2007/04/03 04:14:26 tgl Exp $ -->
<chapter id="storage">
@@ -240,8 +240,9 @@ of the LZ family of compression techniques. See
<para>
Out-of-line values are divided (after compression if used) into chunks of at
-most <literal>TOAST_MAX_CHUNK_SIZE</> bytes (this value is a little less than
-<literal>BLCKSZ/4</>, or about 2000 bytes by default). Each chunk is stored
+most <symbol>TOAST_MAX_CHUNK_SIZE</> bytes (by default this value is chosen
+so that four chunk rows will fit on a page, making it about 2000 bytes).
+Each chunk is stored
as a separate row in the <acronym>TOAST</> table for the owning table. Every
<acronym>TOAST</> table has the columns <structfield>chunk_id</> (an OID
identifying the particular <acronym>TOAST</>ed value),
@@ -260,10 +261,12 @@ regardless of the actual size of the represented value.
<para>
The <acronym>TOAST</> code is triggered only
-when a row value to be stored in a table is wider than <literal>BLCKSZ/4</>
-bytes (normally 2 kB). The <acronym>TOAST</> code will compress and/or move
+when a row value to be stored in a table is wider than
+<symbol>TOAST_TUPLE_THRESHOLD</> bytes (normally 2 kB).
+The <acronym>TOAST</> code will compress and/or move
field values out-of-line until the row value is shorter than
-<literal>BLCKSZ/4</> bytes or no more gains can be had. During an UPDATE
+<symbol>TOAST_TUPLE_TARGET</> bytes (also normally 2 kB)
+or no more gains can be had. During an UPDATE
operation, values of unchanged fields are normally preserved as-is; so an
UPDATE of a row with out-of-line values incurs no <acronym>TOAST</> costs if
none of the out-of-line values change.