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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Greg Smith <greg(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 11:52:35
Message-ID: 20130530115235.GA13335@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-05-30 07:48:51 -0400, Greg Smith wrote:
> On 5/30/13 7:17 AM, Andres Freund wrote:
> >That argument in contrast I find not very convincing though. What was
> >the last incidence of such a system call that did not just error out
> >with ENOTSUPP or such?
>
> http://linux.die.net/man/2/posix_fadvise talks about POSIX_FADV_NOREUSE and
> POSIX_FADV_WILLNEED being both buggy and quietly mapped to a no-op,
> depending on your version. I know there were more examples than just that
> one that popped up during the testing of effective_io_concurrency. My
> starting position has to assume that posix_fallocate can have the same sort
> of surprising behavior that showed up repeatedly when we were trying to use
> posix_fadvise more aggressively.

Uh. How is that a correctness problem? fadvise is a hint which is pretty
different from a fallocate where ignoring would have way much more
severe consequences.
I don't think that's a very meaningful comparison.

> The way O_SYNC was quietly mapped to O_DSYNC (which isn't the same thing)
> was a similar issue, and that's the first one that left me forever skeptical
> of Linux kernel claims in this area until they are explicitly validated:
> http://lwn.net/Articles/350225/

Yea, but that mistake is literally decades old...

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 Robert Haas 2013-05-30 11:54:38 Re: removing PD_ALL_VISIBLE
Previous Message Greg Smith 2013-05-30 11:48:51 Re: fallocate / posix_fallocate for new WAL file creation (etc...)