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

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: David Gould <daveg(at)sonic(dot)net>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Anand Ranganathan <arangana(at)adobe(dot)com>, Alex Eulenberg <aeulenbe(at)adobe(dot)com>, Ashokraj M <ashokraj(at)adobe(dot)com>, Hari <hari(at)adobe(dot)com>, Elein Mustain <mustain(at)adobe(dot)com>
Subject: Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors
Date: 2012-12-12 12:23:12
Message-ID: 50C87730.4010707@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12.12.2012 14:17, David Gould wrote:
> On Wed, 12 Dec 2012 12:27:11 +0100
> Andres Freund<andres(at)2ndquadrant(dot)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.

The bug's been fixed now, but note that huge tuples like this will
always cause the table to be extended. Even if there are completely
empty pages in the table, after a vacuum. Even a completely empty
existing page is not considered spacious enough in this case, because
it's still too small when you take fillfactor into account, so the
insertion will always extend the table. If you regularly run into this
situation, you might want to raise your fillfactor..

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Gould 2012-12-12 12:24:07 Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors
Previous Message David Gould 2012-12-12 12:17:31 Re: Re: bulk_multi_insert infinite loops with large rows and small fill factors