Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors

Поиск
Список
Период
Сортировка
От David Gould
Тема Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors
Дата
Msg-id 20121212041731.1159bc85@jekyl.davidgould.org
обсуждение исходный текст
Ответ на Re: bulk_multi_insert infinite loops with large rows and small fill factors  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors
Список pgsql-hackers
On Wed, 12 Dec 2012 12:27:11 +0100
Andres Freund <andres@2ndquadrant.com> wrote:

> On 2012-12-12 03:04:19 -0800, David Gould wrote:
> >
> > COPY IN loops in heap_multi_insert() extending the table until it fills the

> Heh. Nice one. Did you hit that in practice?

Yeah, with a bunch of hosts that run postgres on a ramdisk, and that copy
happens late in the initial setup script for new hosts. The first batch of
new hosts to be setup with 9.2 filled the ramdisk, oomed and fell over
within a minute. Since the script setups up a lot of stuff we had no idea
at first who oomed.

> ISTM this would be fixed with a smaller footprint by just making
> 
> if (PageGetHeapFreeSpace(page) <  MAXALIGN(heaptup->t_len) + saveFreeSpace)
> 
> if (!PageIsEmpty(page) &&
>     PageGetHeapFreeSpace(page) <  MAXALIGN(heaptup->t_len) + saveFreeSpace)
> 
> I think that should work?

I like PageIsEmpty() better (and would have used if I I knew), but I'm not
so crazy about the negation.

-dg

-- 
David Gould              510 282 0869         daveg@sonic.net
If simplicity worked, the world would be overrun with insects.



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors