Re: Forcing WAL switch - Mailing list pgsql-novice

From Walker, Jed S
Subject Re: Forcing WAL switch
Date
Msg-id F7638DABBEBB4A4CB70616DE2B19E6B806729A@COENGEXCMB01.cable.comcast.com
Whole thread Raw
In response to Forcing WAL switch  ("Walker, Jed S" <Jed_Walker@cable.comcast.com>)
Responses Re: Forcing WAL switch
List 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@sss.pgh.pa.us]
Sent: Thursday, August 11, 2005 3:38 PM
To: Walker, Jed S
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Forcing WAL switch

"Walker, Jed S" <Jed_Walker@cable.comcast.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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cast Problem - varchar() problem
Next
From: Tom Lane
Date:
Subject: Re: Forcing WAL switch