Re: Simple, safe hot backup and recovery

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Yoshinori Sano <yoshinori(dot)sano(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simple, safe hot backup and recovery
Date: 2009-06-05 13:40:44
Message-ID: 200906051340.n55Deir15622@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao wrote:
> Hi,
>
> On Fri, Jun 5, 2009 at 5:10 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >> psql $DB_NAME -c "SELECT pg_stop_backup();"
> >> sleep 10 # Why we need this?
> >> rm /var/lib/pgsql/backup_in_progress
> >> tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
> >
> > Since all WAL files generated during backup have to be added into backup.tar,
> > I guess that "sleep 10" waits until they are archived.
>
> In v8.4, pg_stop_backup waits until all WAL files used during backup
> are archived.
> So, "sleep" is already unnecessary for standalone hot backup.
>
> Here is one-line patch to get rid of the description of that needless
> operation from
> backup.sgml.

Good point, applied. Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-06-05 13:46:01 Re: Re: [COMMITTERS] pgsql: Initialise perl library as documented in perl API.
Previous Message Tom Lane 2009-06-05 13:38:32 Re: PostgreSQL Developer meeting minutes up