pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Karcher <thkarcher@gmx.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Consistent PITR backup
Date: Thu, 11 Oct 2007 10:22:49 -0400
Message-ID: <13019.1192112569@sss.pgh.pa.us> (raw)
In-Reply-To: <20071011093908.GA7988@arche.mine.nu>
References: <20071011093908.GA7988@arche.mine.nu>

Thomas Karcher <thkarcher@gmx.de> writes:
> My idea is now: When doing a consistent PITR backup, extend the
> documented steps between 4 (pg_stop_backup()) and 5 (wait for archived
> WAL file) with a busy wait on pg_xlog/archive_status/*.ready files - as
> soon as no .ready files are there anymore, the archiver has done its
> work, and I can safely backup the archived WAL files in order to have a
> really consistent backup.

If the database is busy, you might never see an instant where there are
no .ready files.  Certainly it's possible that this approach will
archive many more segments than you need.

> Is that right? Or is there an easier way to do it?

I believe the intended way to do this is to look at pg_stop_backup's
return value to determine the last segment you need to archive.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <13019.1192112569@sss.pgh.pa.us>
Permalink:  ../13019.1192112569@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13019.1192112569@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, thkarcher@gmx.de
  Subject: Re: Consistent PITR backup
  In-Reply-To: <13019.1192112569@sss.pgh.pa.us>

* 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