Re: Snapshot backups

From: James Sewell <james(dot)sewell(at)lisasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alban Hertroys <haramrae(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Snapshot backups
Date: 2013-08-02 01:14:14
Message-ID: CANkGpBvMd9pzJE_nPFAyH9M_SfC3XFaE6ukprwhvCxQ52iT3_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you Tom! This is what I was after!

So, to get this straight in my head.

- pg_start_backup forces a checkpoint and writes the information from
this checkpoint to the backup_label file
- <snapshot>
- pg_stop_backup removes the backup_label file
- <disaster!>
- <restore snapshot>
- Database starts and determines where to start WAL replay from the
backup_label NOT from pg_control (as usual)

Cheers,
James

James Sewell
PostgreSQL Team Lead / Solutions Architect
_____________________________________

[image:
http://www.lisasoft.com/sites/lisasoft/files/u1/2013hieghtslogan_0.png]

Level 2, 50 Queen St,
Melbourne, VIC, 3000

P: 03 8370 8000 F: 03 8370 8099 W: www.lisasoft.com

On Wed, Jul 31, 2013 at 10:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alban Hertroys <haramrae(at)gmail(dot)com> writes:
> > That begs the question what happens in case of a crash or (worse) a
> partial crash when multiple file systems are involved.
>
> As long as the OS+hardware honors the contract of fsync(), everything's
> fine. If the storage system loses data that it claims to have fsync'd to
> stable storage, there's not much we can do about that, except recommend
> that you have a backup plan.
>
> In practice, the more complicated your storage infrastructure is, the more
> likely it is to have bugs ...
>
> regards, tom lane
>

--

------------------------------
The contents of this email are confidential and may be subject to legal or
professional privilege and copyright. No representation is made that this
email is free of viruses or other defects. If you have received this
communication in error, you may not copy or distribute any part of it or
otherwise disclose its contents to anyone. Please advise the sender of your
incorrect receipt of this correspondence.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2013-08-02 06:49:55 Re: Why are stored procedures looked on so negatively?
Previous Message Adrian Klaver 2013-08-02 00:15:51 Re: Add a NOT NULL column with default only during add