Re: splitting *_desc routines

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: splitting *_desc routines
Date: 2012-08-30 16:14:24
Message-ID: 201208301814.24534.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, August 29, 2012 10:06:16 PM Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-08-30 16:17:17 Re: rows modified in current transaction
Previous Message Andres Freund 2012-08-30 16:09:43 Re: rows modified in current transaction