Re: fallocate / posix_fallocate for new WAL file creation (etc...)

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Date: 2013-05-30 12:58:26
Message-ID: 20130530125826.GE14029@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-05-30 08:53:37 -0400, Stephen Frost wrote:
> * Andres Freund (andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-05-30 13:15:39 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Stephen Frost 2013-05-30 12:53:37 Re: fallocate / posix_fallocate for new WAL file creation (etc...)