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

From Alvaro Herrera
Subject Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Date
Msg-id 20130516031705.GE15045@eldon.alvh.no-ip.org
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...)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
List pgsql-hackers
Jon Nelson escribió:
> On Wed, May 15, 2013 at 4:46 PM, Jon Nelson <jnelson+pgsql@jamponi.net> wrote:

> > 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.

Would it work to just assign the value you got from posix_fallocate (if
nonzero) to errno and then use %m in the errmsg() call in ereport()?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Jon Nelson
Date:
Subject: Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Next
From: Tom Lane
Date:
Subject: Re: plperl segfault in plperl_trusted_init() on kfreebsd