Re: Snapshot backups

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: James Sewell <james(dot)sewell(at)lisasoft(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Snapshot backups
Date: 2013-07-29 06:54:17
Message-ID: CA+HiwqFhukXr-GyNZiUgPJP=5Fobsa2UTgeC=p4=sA8r4hW+eA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 29, 2013 at 3:32 PM, James Sewell <james(dot)sewell(at)lisasoft(dot)com>wrote:

> Hey all,
>
> I understand that I have already been given an answer here, but I am still
> curious as to why this is the case (perhaps I should ask this on the
> hackers list though, if so let me know).
>
> More importantly I'd like to understand why I would need to use the
> start/stop backup commands to ensure a valid backup when using filesystem
> snapshots (assuming I get the order correct)- worst case scenario wouldn't
> it be the same as a crash and cause an automatic roll-forward?
>
>
>
​pg_start_backup('backup_label') and pg_stop_backup(), if I understand it
correctly, ​write to the 'backup_label' file the information necessary to
recover "consistently" from that backup. For example, backup_label file
contains the checkpoint location and its REDO location (identified as "START
WAL LOCATION:" field in the backup_label file.) While you are reading the
code, you can read the comment above the function read_backup_label()
in src/backend/access/transam/xlog.c

--
Amit Langote

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Loïc Rollus 2013-07-29 06:58:28 Re: Trigger and deadlock
Previous Message James Sewell 2013-07-29 06:32:25 Re: Snapshot backups