Re: Basic question on recovery and disk snapshotting

From: Yang Zhang <yanghatespam(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Jov <amutu(at)amutu(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Basic question on recovery and disk snapshotting
Date: 2013-05-02 02:40:56
Message-ID: CAKxBDU_KhHR+fe7Z6CjS_L=WktpAbtQEaPFvwPoK7QK14v_r7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 1, 2013 at 4:56 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Amit Langote 2013-05-02 04:12:48 Confusing comment in xlog.c or am I missing something?
Previous Message Tom Lane 2013-05-02 00:03:25 Re: MKDIR_P@: Command not found error in regression test