Re: fallocate / posix_fallocate for new WAL file creation (etc...) - Mailing list pgsql-hackers

From Greg Smith
Subject Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Date
Msg-id 51A75434.80609@2ndQuadrant.com
Whole thread Raw
In response to Re: fallocate / posix_fallocate for new WAL file creation (etc...)  (Stephen Frost <sfrost@snowman.net>)
Responses Re: fallocate / posix_fallocate for new WAL file creation (etc...)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 5/30/13 8:50 AM, Stephen Frost wrote:
> I don't think this solves the locking issue around the
> relation extention lock, but it might help some and it may make it
> easier to tweak that logic to allocate larger chunks in the future.

It might make it a bit faster, but it doesn't make it any easier to 
implement.  The messy part of extending relations in larger chunks is 
how to communicate that back into the buffer manager usefully.  The 
extension path causing trouble is RelationGetBufferForTuple calling 
ReadBufferBI.  All of that is passing a single buffer around.  There's 
no simple way I can see to rewrite it to handle more than one at a time.

I have a test case for relation extension that I'm going to package up 
soon.  That makes it easy to see where the problem is at.  Far as I can 
tell the reason it hasn't been fixed before now is that it's a pain to 
write the code.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Cédric Villemain
Date:
Subject: Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Next
From: Heikki Linnakangas
Date:
Subject: Freezing without write I/O