Further plans to refactor xlog.c - Mailing list pgsql-hackers

From Simon Riggs
Subject Further plans to refactor xlog.c
Date
Msg-id CA+U5nM+BEH4J3=SWZnaCxeX1ToN5MWAG49z7Z9Yfzie=GgDkaQ@mail.gmail.com
Whole thread Raw
Responses Re: Further plans to refactor xlog.c
List pgsql-hackers
Next steps in refactoring are bigger steps, but not huge ones.

I propose this

* everything to do with XLOG rmgr into a file called xlogrmgr.c
Thats xlog_redo() and most everything to do with checkpoints

* everything to do with reading WAL files into a file called xlogread.c
That will allow us to put pg_xlogdump into core

* possibly some more stuff into xlogboot.c

The above actions will reduce xlog.c to about 7000 lines, about 4000
lines smaller than when I started. That sounds like it could go
further, but it moves out most of the areas of recent growth by
focusing on the purpose of that code.

An obvious split would seem to be move all recovery-side code into its
own file. That seems quite likely to take a lot of time, break
something, as well as requiring us to share XLogCtl, all of which
personally I would rather avoid.

Fujii's work is likely to remove another few hundred lines as well.

That seems enough to me.... OK?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Term positions in GIN fulltext index
Next
From: Florian Pflug
Date:
Subject: Re: GiST for range types (was Re: Range Types - typo + NULL string constructor)