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

From Andres Freund
Subject Re: splitting *_desc routines
Date
Msg-id 201208301814.24534.andres@2ndquadrant.com
Whole thread Raw
In response to Re: splitting *_desc routines  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: splitting *_desc routines
List pgsql-hackers
On Wednesday, August 29, 2012 10:06:16 PM Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > I looked at Andres' patch and the general idea is rather horrible: it
> > links all backend files into the output executable.  This is so that the
> > *_desc functions can be used from their respective object files, which
> > obviously have a lot of requirements for backend infrastructure.
> 
> Check.
I said it was a preliminary hack though ;). Especially the way I assembled the 
object files... 
The xlogdump utility itself is equally crappy atm, it was just a demonstration 
which suited me enough for debugging... But it really doesn't need that much 
more.

> An alternative thing that might be worth considering before you go all
> in on this is whether the xlogdump functionality shouldn't just be part
> of the regular server executable, ie you'd call it with
> 
>     postgres --xlogdump <arguments>
> 
> and the only extra code needed is two lines for another redirect in
> main.c.  We've already done that for things like --describe-config.
> This'd likely be a lot less work than getting the _desc routines to
> be operable standalone ...
It definitely would be simpler. It doesn't seem nice to pile more and more 
utilities into the main postgres binary though.

Note the ugliness some the testing tools in src/backend go through just to 
link to a few files... Yuck.

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: rows modified in current transaction
Next
From: Tom Lane
Date:
Subject: Re: rows modified in current transaction