pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Ian Lea <ian.lea@gmail.com>
To: David Roland <david.roland@soapware.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_start_backup - backups
Date: Mon, 11 Apr 2011 10:47:12 -0500
Message-ID: <4DA2DC30020000250003C644@gw.wicourts.gov> (raw)
In-Reply-To: <7E0E9F0DF4C17A40BE6F616E6492B4D353E507@ExchangeVM.DOCS.COM>
References: <1302200280041-4289135.post@n5.nabble.com>
	<BANLkTik2vMyXb7EyeQLVUW8waAKDBaU4rA@mail.gmail.com>
	<7E0E9F0DF4C17A40BE6F616E6492B4D353E507@ExchangeVM.DOCS.COM>

"David Roland" <david.roland@soapware.com> wrote:
 
> changes to the data folder continue even after the PG_START_BACKUP
> command has been issued. This implies to me that the contents of
> any copy of the data folder may be unreliable. i.e. the copy may
> not reflect the state of the data folder either before the copy
> started or after the copy has finished. It may reflect the state
> of the data folder in some transient form.
 
Right.
 
> Assuming this is true, is the copy still usable for restoration?
 
Yes.
 
> If so, how does PostgreSQL get the data folder to a stable
> state? Is it by the use of the WAL files that may be created
> during the backup process and the restore.config file?
 
Exactly.  Simplifying somewhat:
 
- The pg_start_backup causes the WAL position to be remembered.  You
  will need to start WAL replay at this point.
 
- Every significant change to a page is WAL-logged.
 
- Changes after you record the restart point may or may not be in
  the base backup.
 
- After the base backup copying is complete, pg_stop_backup records
  the WAL position.  You will need to replay WAL *at least* to this
  point to have a consistent database.
 
- WAL replay will bring every page modified after the "start" to a
  valid state, whether or not any or all direct modifications to
  that page made it into the base backup.
 
- This actually goes beyond page fix-ups to file creation and
  deletion, etc.
 
-Kevin



view thread (6+ messages)  latest in thread

Message-ID: <4DA2DC30020000250003C644@gw.wicourts.gov>
Permalink:  ../4DA2DC30020000250003C644@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4DA2DC30020000250003C644@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, ian.lea@gmail.com, david.roland@soapware.com
  Subject: Re: pg_start_backup - backups
  In-Reply-To: <4DA2DC30020000250003C644@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox