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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(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 12:17:28
Message-ID: 51A74358.2010501@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-05-30 12:19:17 Re: fallocate / posix_fallocate for new WAL file creation (etc...)
Previous Message Andres Freund 2013-05-30 12:14:27 Re: fallocate / posix_fallocate for new WAL file creation (etc...)