Re: Modifying TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Greg Stark" <stark(at)enterprisedb(dot)com>, "Shadar" <shauldar(at)gmail(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Modifying TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET?
Date: 2009-06-11 16:12:22
Message-ID: 4A30E69602000025000278C8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> So what *is* the difference between EXTENDED and MAIN?
>
> EXTENDED columns get pushed out first. So if you have some EXTENDED
> columns and some MAIN columns, it'll give preference to keeping the
> MAIN columns in-line. In the OP's case there's only one wide column
> so this is of no help.

Got it. The documentation seems less than clear on this. Perhaps the
description of MAIN on this page:

http://www.postgresql.org/docs/8.3/interactive/storage-toast.html

should be changed. How does this sound?:

MAIN allows compression but discourages out-of-line storage.
(Out-of-line storage will be performed only if the row is still too
big after compression and out-of-line storage of EXTENDED and EXTERNAL
columns.)

If there is consensus, I'll put that into patch form.

It seems to me that MAIN might be a more useful option if it was more
aggressive about avoiding out-of-line storage; perhaps only if the row
doesn't fit by itself on a single page? Does anyone else think so?

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-06-11 17:10:30 Re: pgindent run coming
Previous Message Tom Lane 2009-06-11 15:52:13 Re: Modifying TOAST_TUPLE_THRESHOLD and TOAST_TUPLE_TARGET?