Hackers,

Is there some documentation on TOAST?  In the SGML docs there isn't even
a description of it, and in the release notes I cannot find anything but
very light mentions.  I've seen descriptions scattered around the web
while Googling, but they are very light and don't seem "official".

Any pointers will be appreciated,

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"Cuando no hay humildad las personas se degradan" (A. Christie)

Wed, 11 Sep 2002 00:28:22 -0400
Alvaro Herrera <alvherre@atentus.com>
TOAST docs
Alvaro Herrera writes:

> Is there some documentation on TOAST?

No.  Why do you need any?

-- 
Peter Eisentraut   peter_e@gmx.net


Fri, 13 Sep 2002 00:09:02 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: TOAST docs
On Fri, 13 Sep 2002, Peter Eisentraut wrote:

> Alvaro Herrera writes:
> 
> > Is there some documentation on TOAST?
> 
> No.  Why do you need any?

I think I saw some docs in the 

/usr/local/src/postgresql-7.2.1/src/backend/access/heap/tuptoaster.c

file on my box.  :-)

Actually it is pretty well commented, so I'm not just being a smart ass 
here.


Thu, 12 Sep 2002 16:26:40 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: TOAST docs
On Fri, 2002-09-13 at 00:09, Peter Eisentraut wrote:
> Alvaro Herrera writes:
> 
> > Is there some documentation on TOAST?
> 
> No.  Why do you need any?

IIRC there were some ways to tweak when TOAST gets used, when it goes
out to toastfile and when it uses compressed/non-compressed storage.

I hope this is documented someplace, no ?

-------------
Hannu


13 Sep 2002 11:20:46 +0200
Hannu Krosing <hannu@tm.ee>
Re: TOAST docs
"scott.marlowe" wrote:
> 
> On Fri, 13 Sep 2002, Peter Eisentraut wrote:
> 
> > Alvaro Herrera writes:
> >
> > > Is there some documentation on TOAST?
> >
> > No.  Why do you need any?
> 
> I think I saw some docs in the
> 
> /usr/local/src/postgresql-7.2.1/src/backend/access/heap/tuptoaster.c
> 
> file on my box.  :-)
> 
> Actually it is pretty well commented, so I'm not just being a smart ass
> here.

Inline comments are not exactly what I call "documentation", but
thanks for the flowers anyway.

Hannu is right though, that there are ways to tweak the behavior
by running the risk to currupt your system catalogs (read:
manually updating it). Originally I had in mind to add some
administrative utilities that give a safe access to these
settings ... if the past year would just have been a bit less
stressful ...


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. #
# Let's break this rule - forgive
me.                                  #
#==================================================
JanWieck@Yahoo.com #

Fri, 13 Sep 2002 11:26:40 -0400
Jan Wieck <JanWieck@Yahoo.com>
Re: TOAST docs
On Fri, 2002-09-13 at 17:26, Jan Wieck wrote:
> "scott.marlowe" wrote:
> > I think I saw some docs in the
> > 
> > /usr/local/src/postgresql-7.2.1/src/backend/access/heap/tuptoaster.c
> > 
> > file on my box.  :-)
> > 
> > Actually it is pretty well commented, so I'm not just being a smart ass
> > here.
> 
> Inline comments are not exactly what I call "documentation", but
> thanks for the flowers anyway.

But this is how most of backend is "documented" ;)

> Hannu is right though, that there are ways to tweak the behavior
> by running the risk to currupt your system catalogs (read:
> manually updating it). Originally I had in mind to add some
> administrative utilities that give a safe access to these
> settings ...

I quess the quickest/easiest and most universal (immediately usable by
"other" admin utils) would be a set of pl/pgsql or sql functions.

-----------
Hannu


13 Sep 2002 18:44:43 +0200
Hannu Krosing <hannu@tm.ee>
Re: TOAST docs
Hannu Krosing wrote:
> IIRC there were some ways to tweak when TOAST gets used, when it goes
> out to toastfile and when it uses compressed/non-compressed storage.
> 
> I hope this is documented someplace, no ?

There is a mention of it in the ALTER TABLE doc:

ALTER TABLE [ ONLY ] table [ * ]
   ALTER [ COLUMN ] column SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }

SET STORAGE

This form sets the storage mode for a column. This controls whether this 
column is held inline or in a supplementary table, and whether the data should 
be compressed or not. PLAIN must be used for fixed-length values such as 
INTEGER and is inline, uncompressed. MAIN is for inline, compressible data. 
EXTERNAL is for external, uncompressed data and EXTENDED is for external, 
compressed data. EXTENDED is the default for all datatypes that support it. 
The use of EXTERNAL will make substring operations on a TEXT column faster, at 
the penalty of increased storage space.

Joe


Fri, 13 Sep 2002 09:46:08 -0700
Joe Conway <mail@joeconway.com>
Re: TOAST docs
Joe Conway wrote:
> 
> Hannu Krosing wrote:
> > IIRC there were some ways to tweak when TOAST gets used, when it goes
> > out to toastfile and when it uses compressed/non-compressed storage.
> >
> > I hope this is documented someplace, no ?
> 
> There is a mention of it in the ALTER TABLE doc:
> 
> ALTER TABLE [ ONLY ] table [ * ]
>    ALTER [ COLUMN ] column SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
> 
> SET STORAGE
> 
> This form ...

We have that already? Seems my memory doesn't serve as good as it
used to ... I'm getting old, folks. Thanks to whoever did it.

Now the other magic thingy is, that on CREATE TABLE the column
storage is taken from the pg_type entry. Someone could manipulate
that and default all text columns to external for example. 


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. #
# Let's break this rule - forgive
me.                                  #
#==================================================
JanWieck@Yahoo.com #

Fri, 13 Sep 2002 13:52:05 -0400
Jan Wieck <JanWieck@Yahoo.com>
Re: TOAST docs