From: Tom Lane <tgl@sss.pgh.pa.us>
To: Drazen Kacar <drazen.kacar@oradian.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Zeroed out pages at the end of the database files
Date: Wed, 30 Oct 2013 12:48:40 -0400
Message-ID: <4981.1383151720@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFxrd3t97h=xPGLF61t=tAN8avOBhco5C9Ce-8zy2AsNsL4hqw@mail.gmail.com>
References: <CAFxrd3t97h=xPGLF61t=tAN8avOBhco5C9Ce-8zy2AsNsL4hqw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Drazen Kacar <drazen.kacar@oradian.com> writes:
> It turned out that pg_filedump reported errors for 34 database files, but
> that was because all those files had one or more database pages (8k) at the
> end of the file zeroed out.
This can definitely happen after a database crash; it's not a problem
since the wasted space will be recovered by VACUUM.
I don't recall at the moment if there are any code paths that can cause
it without a crash. However, if you're looking directly at the disk
files it's definitely possible for there to be zeroes in a page that
has been obtained from the OS but never yet flushed out of shared
buffers.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, drazen.kacar@oradian.com
Subject: Re: Zeroed out pages at the end of the database files
In-Reply-To: <4981.1383151720@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox