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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Idea: recycle WAL segments, don't delete/recreate 'em
Date: 2001-07-17 17:31:16
Message-ID: 200107171731.f6HHVGx17673@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I have noticed that a large fraction of the I/O done by 7.1 is
> associated with initializing new segments of the WAL log for use.
> (We have to physically fill each segment with zeroes to ensure that
> the system has actually allocated a whole 16MB to it; otherwise we
> fall victim to the "hole-saving" allocation technique of most Unix
> filesystems.) I just had an idea about how to avoid this cost:
> why not recycle old log segments? At the point where the code
> currently deletes a no-longer-needed segment, just rename it to
> become the next created-in-advance segment.

This sounds good and with UNDO far off, would be a big win. The
segement number seems like a good idea. I can't see any disadvantages.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-07-17 17:33:52 Re: pg_depend
Previous Message Tom Lane 2001-07-17 17:21:34 Re: SIGCHLD handler in Postgres C function.