Re: Idea: recycle WAL segments, don't delete/recreate 'em - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Idea: recycle WAL segments, don't delete/recreate 'em
Date
Msg-id 200107171731.f6HHVGx17673@candle.pha.pa.us
Whole thread Raw
In response to Idea: recycle WAL segments, don't delete/recreate 'em  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_depend
Next
From: Peter Eisentraut
Date:
Subject: Re: ALTER TABLE ADD COLUMN column SERIAL -- unexpected results