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

From Jon Nelson
Subject Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Date
Msg-id CAKuK5J3WtHSCYnhvtYP3u6VwxuGyijO4383Du03qs8R6avOG1A@mail.gmail.com
Whole thread Raw
In response to Re: fallocate / posix_fallocate for new WAL file creation (etc...)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Responses Re: fallocate / posix_fallocate for new WAL file creation (etc...)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Wed, May 15, 2013 at 4:46 PM, Jon Nelson <jnelson+pgsql@jamponi.net> wrote:
> On Wed, May 15, 2013 at 4:34 PM, Andres Freund <andres@2ndquadrant.com> wrote:
..
>> Some where quick comments, without thinking about this:
>
> Thank you for the kind feedback.
>
>> * needs a configure check for posix_fallocate. The current version will
>>   e.g. fail to compile on windows or many other non linux systems. Check
>>   how its done for posix_fadvise.

The following patch includes the changes to configure.in.
I had to make other changes (not included here) because my local
system uses autoconf 2.69, but I did test this successfully.

> That's true. I originally wrote the patch using fallocate(2). What
> would be appropriate here? Should I switch on the return value and the
> six (6) or so relevant error codes?

I addressed this, hopefully in a reasonable way.

--
Jon

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Heap truncation without AccessExclusiveLock (9.4)
Next
From: Alvaro Herrera
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)