Re: 7.2.3: tuple is too big (max 8136)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.2.3: tuple is too big (max 8136)
Дата
Msg-id 25508.1036376394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 7.2.3: tuple is too big (max 8136)  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Technically there is still a tuple size limit.  It's just that many types
> can be pulled out of the main storage of the table and you get a reference
> to its value in the main storage rather than the value itself.  That's how
> the 8k limit was circumvented.  The tuple size limit is part of why
> there's a maximum column count, AFAIK the main tuple still needs to fit in
> one page.

Right.  You could fit 1600 int4 columns (6400 bytes total), but not 1600
int8 columns.  TOAST pointer entries are 20 bytes each, so if all your
columns are toastable types (like varchar) then the upper limit would be
about 400 columns.

In practice, performance will probably suck with more than a couple
hundred columns anyway.  You'd be better off rethinking your database
design.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: Spanish version of the PostgreSQL "Advocacy and Marketing" site is ready
Следующее
От: "Matthew Nuzum"
Дата:
Сообщение: quoting and EXECUTE in plpgsql function