From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, "Simon Riggs *EXTERN*" <simon(at)2ndquadrant(dot)com> |
Subject: | Re: backup_label and server start |
Date: | 2008-03-17 21:49:27 |
Message-ID: | 200803172149.m2HLnSK08467@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Added to TODO:
o Fix server restart problem when the server was shutdown during
a PITR backup
http://archives.postgresql.org/pgsql-hackers/2007-11/msg00800.php
---------------------------------------------------------------------------
Albe Laurenz wrote:
> >> If the postmaster is stopped with 'pg_ctl stop' while an
> >> online backup is in progress, the 'backup_label' file will remain
> >> in the data directory.
> [...]
> >> the startup process will fail with a message like this:
> [...]
> >> PANIC: could not locate required checkpoint record
> >> HINT: If you are not restoring from a backup, try removing the file "/POSTGRES/data/PG820/backup_label".
> >>
> >> wouldn't it be a good thing
> >> for the startup process to ignore (and rename) the backup_label
> >> file if no recovery.conf is present?
>
> Tom Lane replied:
> > No, it certainly wouldn't.
>
> Point taken. When backup_label is present and recovery.conf isn't,
> there is the risk that the data directory has been restored from
> an online backup, in which case using the latest available
> checkpoint would be detrimental.
>
> > I don't see why we should simplify the bizarre case you're
> > talking about
>
> Well, it's not a bizarre case, it has happened twice here.
>
> If somebody stops the postmaster while an online backup is
> in progress, there is no warning or nothing. Only the server
> will fail to restart.
>
> One of our databases is running in a RedHat cluster, which
> in this case cannot failover to another node.
> And this can also happen during an online backup.
>
> Simon Riggs replied:
> > The hint is telling you how to restart the original server, not a crafty
> > way of cheating the process to allow you to use it for backup.
> >
> > What are you trying to do?
>
> You misunderstood me, I'm not trying to cheat anything, nor do
> I want to restore a backup that way.
>
> All I want to do is restart a server after a clean shutdown.
>
> How about my second suggestion:
>
> Remove backup_label when the server shuts down cleanly.
> In that case an online backup in progress will not be useful
> anyway, and there is no need to recover on server restart.
>
> What do you think?
>
> Yours,
> Laurenz Albe
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-03-17 21:59:32 | Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that |
Previous Message | Peter Eisentraut | 2008-03-17 21:46:08 | Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that |