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

From Andres Freund
Subject Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Date
Msg-id 20130530125826.GE14029@awork2.anarazel.de
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...)
Re: fallocate / posix_fallocate for new WAL file creation (etc...)
List pgsql-hackers
On 2013-05-30 08:53:37 -0400, Stephen Frost wrote:
> * Andres Freund (andres@2ndquadrant.com) wrote:
> > But really, I am not at all concerned about some obscure values being
> > returned, but about a read() not being successful..
> 
> Alright, so what do we need to do to test this?  We really just need a
> short C program written up and then a bunch of folks to run it on
> various architectures, right?

After a bit of standard perusing writing a single byte to the end of the
file after the fallocate ought to make at least the reading guaranteed
to be defined. If we did seek(last_byte); write(); posix_fallocate() we
should even always have defined content. Yuck.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Next
From: Stephen Frost
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)