Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Brown <kevin(at)sysexperts(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Date: 2003-01-25 07:59:17
Message-ID: Pine.NEB.4.51.0301251655010.596@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2003-01-25 10:11:12 Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Previous Message Bruce Momjian 2003-01-25 06:30:25 I am back

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Brown 2003-01-25 10:11:12 Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Previous Message Tom Lane 2003-01-25 05:40:33 WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)