On Wednesday, August 29, 2012 10:06:16 PM Tom Lane wrote: > Alvaro Herrera <alvhe...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers