Обсуждение: TOAST docs

Поиск
Список
Период
Сортировка

TOAST docs

От
Alvaro Herrera
Дата:
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)


Re: TOAST docs

От
Peter Eisentraut
Дата:
Alvaro Herrera writes:

> Is there some documentation on TOAST?

No.  Why do you need any?

-- 
Peter Eisentraut   peter_e@gmx.net



Re: TOAST docs

От
"scott.marlowe"
Дата:
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.



Re: TOAST docs

От
Hannu Krosing
Дата:
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



Re: TOAST docs

От
Jan Wieck
Дата:
"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 #


Re: TOAST docs

От
Hannu Krosing
Дата:
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



Re: TOAST docs

От
Joe Conway
Дата:
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



Re: TOAST docs

От
Jan Wieck
Дата:
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 #