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 CAKxBDU9p2FMkDVgf6w=S=r-w4cUb1r6e=60DhY=XCVRNTpeQyQ@mail.gmail.com
Whole thread Raw
In response to Re: Basic question on recovery and disk snapshotting  (Jov <amutu@amutu.com>)
Responses Re: Basic question on recovery and disk snapshotting
Re: Basic question on recovery and disk snapshotting
Re: Basic question on recovery and disk snapshotting
List pgsql-general
On Sat, Apr 27, 2013 at 4:25 AM, Jov <amutu@amutu.com> wrote:
> Are you sure the EBS snapshot is consistent? if the snapshot is not
> consistent,enven on the same volume,you will have prolbems with your backup.

I think so.  EBS gives you "point-in-time consistent snapshots"
(https://aws.amazon.com/ebs/), but maybe you're using the term
differently.

Even so, it's impossible to take snapshots of two different volumes at
exactly the same time so they won't be consistent with each other,
hence my question.

My question really boils down to: if we're interested in using COW
snapshotting (a common feature of modern filesystems and hosting
environments), would we necessarily need to ensure the data and
pg_xlog are on the same snapshotted volume?  If not, how should we be
taking the snapshots - should we be using pg_start_backup() and then
taking the snapshot of one before the other?  (What order?)  What if
we have tablespaces, do we take snapshots of those, followed by the
cluster directory, followed by pg_xlog?

I read through http://www.postgresql.org/docs/9.1/static/continuous-archiving.html
and it doesn't touch on these questions.

>
> One methed can be try is run pg_start_backup() before take snapshot.
>
>
>
>
> 2013/4/27 Yang Zhang <yanghatespam@gmail.com>
>>
>> We're running on EBS volumes on EC2.  We're interested in leveraging
>> EBS snapshotting for backups.  However, does this mean we'd need to
>> ensure our pg_xlog is on the same EBS volume as our data?
>>
>> (I believe) the usual reasoning for separating pg_xlog onto a separate
>> volume is for performance.  However, if they are on different volumes,
>> the snapshots may be out of sync.
>>
>> Thanks.
>>
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>
>
>
> --
> Jov
> blog: http:amutu.com/blog



--
Yang Zhang
http://yz.mit.edu/


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimizing bulk update performance
Next
From: Tom Lane
Date:
Subject: Re: Basic question on recovery and disk snapshotting