Re: Basic question on recovery and disk snapshotting - Mailing list pgsql-general

From Yang Zhang
Subject Re: Basic question on recovery and disk snapshotting
Date
Msg-id CAKxBDU_KhHR+fe7Z6CjS_L=WktpAbtQEaPFvwPoK7QK14v_r7w@mail.gmail.com
Whole thread Raw
In response to Re: Basic question on recovery and disk snapshotting  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On Wed, May 1, 2013 at 4:56 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> That brings up another point to consider.  If wal level is minimal, then
> tables which you bulk load in the same transaction as you created them or
> truncated them will not get any WAL records written.  (That is the main
> reason the WAL verbosity is reduced).  But that also means that if any of
> those operations is happening while you are taking your snapshot, those
> operations will be corrupted.  If the data and xlogs were part of the same
> atomic snapshot, this would not be a problem, as either the operation
> completed, or it never happened.  But with different snapshots, the data can
> get partially but not completely into the data-snapshot, but then the xlog
> record which says the data was completely written does gets into the xlog
> snapshot

Come to think of it, I'm no longer sure that EBS snapshots, which are
on the block device level, are OK, even if all your data is on a
single volume, since base backups (as documented) are supposed to be
taken via the FS (e.g. normal read operations, or even FS snapshots).
Block device level copies are not mentioned.

Can anyone confirm or refute?


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: MKDIR_P@: Command not found error in regression test
Next
From: Amit Langote
Date:
Subject: Confusing comment in xlog.c or am I missing something?