Re: Idea: recycle WAL segments, don't delete/recreate 'em

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Patrick Macdonald <patrickm(at)redhat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Idea: recycle WAL segments, don't delete/recreate 'em
Date: 2001-07-18 15:19:03
Message-ID: 4966.995469543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Patrick Macdonald <patrickm(at)redhat(dot)com> writes:
> Yes, but in a very roundabout way (or so it seems). The main point
> that I was trying to illustrate was that if a database supports
> point-in-time recovery, recycling of the only available log segments
> is a bad thing.

Certainly, but deleting them is just as bad ;-).

What would need to be changed to use the WAL log for archival purposes
is the control logic that decides when an old log segment is no longer
needed. Rather than zapping them as soon as they're not needed for
crash recovery (our current approach), they'd have to stick around until
archived offline, or perhaps for some DBA-specified length of time
representing how far back you want to allow for PIT recovery.

Nonetheless, at some point an old WAL segment will become deletable
(unless you have infinite space on your WAL disk). ISTM that at that
point, it makes sense to consider recycling the file rather than
deleting it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-07-18 15:24:41 Re: libpgtcl doesn't use UTF encoding of TCL
Previous Message Tom Lane 2001-07-18 15:09:46 Re: AW: Idea: recycle WAL segments, don't delete/recreate ' em