From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
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 13:15:39 |
Message-ID: | 20130530131539.GS6434@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Andres Freund (andres(at)2ndquadrant(dot)com) wrote:
> 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.
Alright, but would that actually be any better than just doing what
glibc's posix_fallocate() does in the generic case? And, to be honest,
it makes me a bit nervous to seek/write like that because it looks like
the typical "create a hole" setup, which we certainly aren't intending,
yet if the posix_fallocate() call disappeared, or did nothing, or this
code was copied w/o it, or someone didn't understand what it did, we
could end up with that.
Not a fan. :(
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2013-05-30 13:16:39 | Re: PostgreSQL 9.3 beta breaks some extensions "make install" |
Previous Message | Andres Freund | 2013-05-30 12:58:26 | Re: fallocate / posix_fallocate for new WAL file creation (etc...) |