Re: tape backups

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben <bench(at)silentmedia(dot)com>
Cc: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: tape backups
Date: 2006-12-24 01:59:25
Message-ID: 23943.1166925565@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben <bench(at)silentmedia(dot)com> writes:
> But, this page confuses me when it talks about pg_start_backup and
> pg_stop_backup. What do these functions do? It seems like they do
> nothing more than let me know which wal files were in use over the
> duration of the backup, which is certainly useful. But they do NOT
> seem to freeze the actual data files, and it seems to me that because
> the data files won't be archived atomically while they may be
> changing, that I might end up with corrupted data files that a replay
> of wal files wouldn't correct. Is my fear groundless?

Yes. The reason we don't have to freeze the data files during a backup
is that any page that changes within that interval will be rewritten
anyway when the WAL log is replayed during recovery. This is why the
WAL sequence has to start before the pg_start_backup rather than at some
later point --- that overlap is exactly what makes it safe to not freeze
the data files.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2006-12-24 02:03:11 Re: Autovacuum Improvements
Previous Message Tom Lane 2006-12-24 01:55:55 Re: [GENERAL] OUTER JOIN IS SLOW