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

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

> Hmmm... my prior appends to this newsgroup are stalled. Hopefully,
> they'll be available soon.
>
> Tom Lane wrote:
> >
> > What you may really be saying is that the existing scheme for management
> > of log segments is inappropriate for PIT usage; if so feel free to
> > propose a better one. But I don't see how recycling of no-longer-wanted
> > segments can break anything.
>
> 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. And, yes, in practice if you have point-in-time
> recovery enabled you better archive your logs with your backup to
> ensure that you can roll forward as expected.

I assume you are not going to do point-in-time recovery by keeping all
the WAL segments around on the same disk. You have to copy them off
somewhere, right, and once you have copied them, why not reuse them?

> A possible solution (as I mentioned before)) is to have 2 methods
> of logging available: circular and forward-recoverable. When a
> database is created, the creator selects which type of logging to
> perform. The log segments are exactly the same, only the recycling
> method is different.

Will not fly. We need a solution that is flexible.

> Hmmm... the more I look at this, the more interested I become.

My assumption is that once a log is full the point-in-time recovery
daemon will copy that off somewhere, either to a different disk, tape,
or over the network to another machine. Once it is done making a copy,
the WAL log can be recycled, right? Am I missing something here?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-07-18 15:56:27 Re: pg_depend
Previous Message Bruce Momjian 2001-07-18 15:45:54 Re: MySQL Gemini code