Re: Snapshot backups - Mailing list pgsql-general

From James Sewell
Subject Re: Snapshot backups
Date
Msg-id CANkGpBvMd9pzJE_nPFAyH9M_SfC3XFaE6ukprwhvCxQ52iT3_Q@mail.gmail.com
Whole thread Raw
In response to Re: Snapshot backups  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses pg_stat_replication became empty suddenly  ("ascot.moss@gmail.com" <ascot.moss@gmail.com>)
List 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

_____________________________________


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@sss.pgh.pa.us> wrote:
Alban Hertroys <haramrae@gmail.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.
Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Add a NOT NULL column with default only during add
Next
From: Chris Travers
Date:
Subject: Re: Why are stored procedures looked on so negatively?