Re: splitting *_desc routines - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: splitting *_desc routines
Date
Msg-id 20121024204435.GI6853@alvh.no-ip.org
Whole thread Raw
In response to Re: splitting *_desc routines  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: splitting *_desc routines  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Here's a small WIP patch that does the proposed splitting.  This is a
first step towards the objective of having a separately compilable
xlogdump -- more work is needed before that can be made to work fully.

Now, per previous discussion, I have split each rmgr's desc function
into its own file.  This is easiest, but it leaves us with several very
small files in some directories; for example we have

./src/backend/access/transam/clog_desc.c
./src/backend/access/transam/xact_desc.c
./src/backend/access/transam/xlog_desc.c
./src/backend/access/transam/mxact_desc.c

and also
./src/backend/commands/dbase_desc.c
./src/backend/commands/seq_desc.c
./src/backend/commands/tablespace_desc.c

Is people okay with that, or should we consider merging each subdir's
files into a single one? (say transam_desc.c and cmds_desc.c).

The other question is whether the function and struct declarations are
in the best possible locations considering that we will want the files
to be compilable without a backend environment.  I am using xlogdump as
a testbed to ensure that everything is kosher (it's not yet there for
other reasons -- I might end up using something other than
xlog_internal.h, for example).

Once we settle these issues, I will finish up the patch by adding nice
file header comments and the like.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: autovacuum truncate exclusive lock round two
Next
From: Jan Wieck
Date:
Subject: Re: autovacuum truncate exclusive lock round two