Re: Forcing WAL switch

From: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "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-12 14:28:20
Message-ID: F7638DABBEBB4A4CB70616DE2B19E6B80672A0@COENGEXCMB01.cable.comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

You mentioned that this was on the list of ToDos. Can we expect this in
8.1?

(It looks like it can be worked around, but having a simple way to get a
clean complete backup shouldn't have to be a workaround.)

-----Original Message-----
From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
Sent: Thursday, August 11, 2005 6:25 PM
To: Tom Lane
Cc: Walker, Jed S; pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Forcing WAL switch

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> How is "switch a WAL" an essential component of that scheme? You
> >> can archive the latest active segment just as well.
>
> > Ah, but that will be over-written later, so you have to store it
> > somewhere safe, rather than just forcing closure of the current WAL
> > file and forcing an archive of it.
>
> So? I still don't see the operational benefit.
>
> If you are running a true PITR operation, that is you are archiving
> off the complete WAL sequence, then forced WAL switches aren't buying
> you anything except wasted archive space. You're still going to want
> to archive the active segment when it's done.
>
> If you're not really doing PITR but just want to use a
> filesystem-level backup, then you can copy the last WAL segment when
> you're done whether it's still active or not.
>
> I honestly think that WAL-switching is a solution in search of a
> problem.

The issue for me is that you really have to store the partially-filled
WAL file some other than the default archive location because when it is
later archived, you don't want it to be overwritten and perhaps fail in
the middle of the write. Making the WAL file switch solves that issue.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania
19073

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chris Browne 2005-08-12 14:53:35 Re: Alter table command is pretty slow
Previous Message Vanessa Conchodon 2005-08-12 12:56:40 Re: connection trouble