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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 10:49:42
Message-ID: CA+Tgmobbf8KnP6fPHHHkCnCzHEcgih+EgBZV+mE8S6X0S9Ru6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 29, 2013 at 10:42 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> FWIW, posix' description about posix_fallocate() doesn't actually say
> *anything* about reading. The guarantee it makes is:
> "If posix_fallocate() returns successfully, subsequent writes to the
> specified file data shall not fail due to the lack of free space on the
> file system storage media.".
>
> http://pubs.opengroup.org/onlinepubs/009696799/functions/posix_fallocate.html
>
> So we don't even know whether we can read. I think that means we need to
> zero the file anyway...

Surely this is undue pessimism.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2013-05-30 10:55:16 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Dimitri Fontaine 2013-05-30 09:02:17 Re: pg_dump with postgis extension dumps rules separately