Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?) - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Date
Msg-id Pine.NEB.4.51.0301251655010.596@angelic.cynic.net
Whole thread Raw
In response to WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, 25 Jan 2003, Tom Lane wrote:

> We'd have to take it on faith that we should replay the visible files
> in their name order.

Couldn't you could just put timestamp information at the beginning if
each file, (or perhaps use that of the first transaction), and read the
beginning of each file to find out what order to run them in. Perhaps
you could even check the last transaction in each file as well to see if
there are "holes" between the available logs.

> This might mean we'd have to abandon the current
> hack of recycling xlog segments by renaming them --- which would be a
> nontrivial performance hit.

Rename and write a "this is an empty logfile" record at the beginning?
Though I don't see how you could do this in an atomic manner.... Maybe if
you included the filename in the WAL file header, you'd see that if the name
doesn't match the header, it's a recycled file....

(This response sent only to hackers.)

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Next
From: Kevin Brown
Date:
Subject: Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)