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:27:54
Message-ID: 50C8784A.5080909@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12.12.2012 14:24, David Gould wrote:
> I don't know if this is the same thing. At least in the comments I was
> reading trying to figure this out there was some concern that someone
> else could change the space on the page. Does RelationGetBufferForTuple()
> guarantee against this too?

Yeah, RelationGetBufferForTuple grabs a lock on the page before
returning it. For comparison, plain heap_insert does simply this:

> buffer = RelationGetBufferForTuple(relation, heaptup->t_len,
> InvalidBuffer, options, bistate,
> &vmbuffer, NULL);
>
> /* NO EREPORT(ERROR) from here till changes are logged */
> START_CRIT_SECTION();
>
> RelationPutHeapTuple(relation, buffer, heaptup);

- Heikki

In response to

Browse pgsql-hackers by date

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