Re: tar error while running basebackup - Mailing list pgsql-general

From Joshua Tolley
Subject Re: tar error while running basebackup
Date
Msg-id 20091013113556.GC32257@eddie
Whole thread Raw
In response to tar error while running basebackup  (Andre Brandt <brandt@decoit.de>)
Responses Re: tar error while running basebackup
List pgsql-general
On Tue, Oct 13, 2009 at 12:40:37PM +0200, Andre Brandt wrote:
> tar: ./base/208106/209062: File shrank by 262144 bytes; padding with zeros
> tar: ./base/208106/210576: file changed as we read it
> tar: ./base/208106/210577: file changed as we read it
> tar: ./base/208106/210431: file changed as we read it
>

This is entirely normal.

> How can this happen? I always thought, that, when in backup mode,
> nothing is able to change the database - so the database files shouldn't
> change. Can autovaccumdb cause the changes?

pg_start_backup() doesn't tell the database to stop writing changes to disk;
it essentially just says "perform a checkpoint", which means all changes as of
that instant are written to the base data files. That ensures that you start
your base backup in a consistent state. When you recover it, replaying the WAL
files will fix any weirdness in your base backup, and you'll get a working
database, current up to the last WAL file you recovered.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Attachment

pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: Re: tar error while running basebackup
Next
From: Andre Brandt
Date:
Subject: Re: tar error while running basebackup