Re: Large C files - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Large C files
Date
Msg-id CAM-w4HOjJQu9J8skM3CODRCoyJo2pwukGisxsjRTvSfAF4bPMA@mail.gmail.com
Whole thread Raw
In response to Re: Large C files  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Large C files
List pgsql-hackers
On Fri, Sep 9, 2011 at 6:57 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
>> In particular, I'd like to know what
>> boundaries it is envisaged that the code should be refactored along to
>> increase its conceptual integrity, or to better separate concerns. I
>> assume that that's the idea, since each new .c file would have to have
>> a discrete purpose.
>
> I'd like to see it split into routines involved in writing WAL, and those
> involved in recovery. And maybe a third file for archiving-related stuff.

Having a clean API for working with WAL independently of recovery
would let us have a maintainable xlogdump tool that doesn't constantly
get out of sync with the wal archive format. It would also make it
easier to write things like prefretching logic that requires reading
the upcoming xlog before its time to actually replay it.


-- 
greg


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Protecting against multiple instances per cluster
Next
From: Bruce Momjian
Date:
Subject: Re: Patch to improve reliability of postgresql on linux nfs