From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, 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 12:47:48 |
Message-ID: | 20130530124748.GP6434@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Peter Eisentraut (peter_e(at)gmx(dot)net) wrote:
> On 5/30/13 7:13 AM, Andres Freund wrote:
> > Why? The spec doesn't specify that case and that very well allows other
> > behaviour. Glibc sure does behave sensibly and zeroes the data
> > (sysdeps/posix/posix_fallocate64.c for the generic implementation) and
> > so does linux' fallocate() syscall, but that doesn't say much about
> > other implementations.
>
> glibc actually only writes one byte to every file system block, to make
> sure the block is allocated. It doesn't actually zero every byte.
That goes back to the 'sane implementation' question.. Is there a case
where that would actually be different from writing zeros for the entire
block..? Is there some OS that gives you random data for the 'hole'
when you write a byte, seek to the start of the next block and then
write another byte? That actually *would* be against what's documented
and required by spec, no?
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2013-05-30 12:50:38 | Re: fallocate / posix_fallocate for new WAL file creation (etc...) |
Previous Message | Ray Stell | 2013-05-30 12:42:21 | Re: [GENERAL] pg_upgrade -u |