Re: TOASTing smaller things

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: TOASTing smaller things
Date: 2007-03-21 22:23:16
Message-ID: 20070321222316.GX12826@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 21, 2007 at 12:37:36PM -0400, Chris Browne wrote:
> 4. A different mechanism would be to add a fifth storage column
> strategy (the present four are PLAIN, EXTENDED, EXTERNAL, MAIN), let's
> say, TOAST.
>
> At present, the 4 values are essentially advisory; columns get TOASTed
> if the column permits EXTENDED storage, but that only occurs if the
> size is greater than TOAST_TUPLE_THRESHOLD.
>
> If the new value was chosen, the column would *always* get stored as
> TOAST.

Rather than a hard and fast limit of 0, why not allow defining a size
threshold? And while we're at it, how about a size threshold for when to
try compressing, too?

> Presumably #1 or #2 could readily get into 8.3 as they're pretty easy;
> #3 is a bit trickier, whilst #4 is probably not "8.3-fittable".
>
> Question:
>
> Which of these sounds preferable?

1 and 2 (variations on how to set the denominator) sound completely
ugly. Trying to minimize wasted space in a toast table is great for a
default, but exposing something like that to the users via any kind of
setting seems way to obtuse.

#3 (GUC for number of bytes) may not make sense for performance reasons,
as Tom mentioned. I'm hoping that it would be easy to check either
pg_class or pg_attribute to see if a table/column has non-standard
toast/compression limits.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-21 22:25:04 Re: relation 71478240 deleted while still in use on 8.1
Previous Message Andrew Dunstan 2007-03-21 22:14:13 Re: CREATE INDEX and HOT - revised design