Re: Do text columns create pg_toast tables? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Do text columns create pg_toast tables?
Date
Msg-id 20080725135816.GC9891@alvh.no-ip.org
Whole thread Raw
In response to Do text columns create pg_toast tables?  ("Woody Woodring" <george.woodring@iglass.net>)
Responses Re: Do text columns create pg_toast tables?
List pgsql-general
Woody Woodring wrote:

> The first table is what I was expecting, but I was surprised by the pg_toast
> entry.  I know I don't have large columns data wise in the transfer table,
> but is the threat of having one ( I have one column defined as 'text')
> enough for it to create the toast infrastructure?

Yep.

> Would changing the column to varchar be more efficient? Or is it the unbound
> nature that creates toast table and we need to be looking at more of a
> varchar(n) scenario?

Nope.

In any case, since you're not using large values, the vacuum of the
toast table is essentially free.

Still, I have a patch that will separate the vacuuming of toast tables
from main tables by autovacuum (8.4 material only).  This will avoid
vacuuming the toast table until it is needed on its own right, and vice
versa.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PANIC: could not write to log file 0
Next
From: Alvaro Herrera
Date:
Subject: Re: PANIC: could not write to log file 0