Re: tar error while running basebackup

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Andre Brandt <brandt(at)decoit(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tar error while running basebackup
Date: 2009-10-13 11:35:56
Message-ID: 20091013113556.GC32257@eddie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andre Brandt 2009-10-13 13:09:03 Re: tar error while running basebackup
Previous Message Glyn Astill 2009-10-13 10:59:34 Re: tar error while running basebackup