Re: Forcing WAL switch

From: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Forcing WAL switch
Date: 2005-08-11 22:01:46
Message-ID: F7638DABBEBB4A4CB70616DE2B19E6B806729A@COENGEXCMB01.cable.comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

If the backup completes, I switch the database out of "backup mode", and
then switch a WAL and it archives, then I know my backup directory
contains the backup and the WAL(s) needed to bring the database to a
consistent state. So, if I can switch a WAL after the backup, then I
truly have a complete backup.

Let's say

10:00 enter backup mode (writing to WAL 0000A8)
10:01 backup database
10:30 exit backup mode (writing to WAL 0000A9)
15:30 "data" storage disk is trashed (still writing to WAL 0000A9)

I have a backup, but I don't have WAL 0000A9 which I need to recover the
database, so my backup is useless (unless as suggested in docu, I keep
multiple backups). If I could have archived WAL 0000A9 after exiting
backup mode it would be in my backup storage and I'd be OK.

Which log was being written to at the start of the backup doesn't really
matter to me as long as it got archived and is in the backup directory
too.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, August 11, 2005 3:38 PM
To: Walker, Jed S
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Forcing WAL switch

"Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com> writes:
> To have a good hot backup. It is worthless if I don't have the log
> that was being written to at the time the backup was occurring
correct?

Right, but how does forcing a segment switch make that any easier? You
still have to determine which segment is current at the time you start
the backup.

regards, tom lane

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-08-11 22:11:30 Re: Forcing WAL switch
Previous Message Tom Lane 2005-08-11 21:49:04 Re: Cast Problem - varchar() problem