Re: Do text columns create pg_toast tables?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Do text columns create pg_toast tables?
Дата
Msg-id 20080725135816.GC9891@alvh.no-ip.org
обсуждение исходный текст
Ответ на Do text columns create pg_toast tables?  ("Woody Woodring" <george.woodring@iglass.net>)
Ответы Re: Do text columns create pg_toast tables?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: PANIC: could not write to log file 0
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PANIC: could not write to log file 0