Re: [PATCH] XLogReader v2

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Satoshi Nagayasu <snaga(at)uptime(dot)jp>, pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, satoshi(dot)nagayasu(at)gmail(dot)com
Subject: Re: [PATCH] XLogReader v2
Date: 2012-07-23 16:13:04
Message-ID: 201207231813.04623.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday, July 23, 2012 05:11:20 PM Robert Haas wrote:
> On Mon, Jul 23, 2012 at 11:04 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:
> > On Monday, July 23, 2012 04:17:39 PM Robert Haas wrote:
> >> On Mon, Jul 23, 2012 at 3:19 AM, Andres Freund <andres(at)2ndquadrant(dot)com>
> >
> > wrote:
> >> > On Thursday, July 19, 2012 07:18:08 PM Satoshi Nagayasu wrote:
> >> >> I agree with that we need more sophisticated way to share the code
> >> >> between the backend and several utilities (including xlogdump),
> >> >> but AFAIK, a contrib module must allow to be built *without* the core
> >> >> source tree.
> >> >
> >> > I don't think thats reasonable. The amount of code duplication
> >> > required to support that usecase is just not reasonable. Especially
> >> > if you want to support pre 9.3 and 9.3+.
> >>
> >> It seems like the direction this is going is that the xlog reading
> >> stuff should be a library which is used by both the backend and 1 or
> >> more xlog decoding tools.
> >
> > Thats fine for the xlogreader itself - it only uses stuff from headers.
> > The problem is that the xlog debugging/printing infrastructure is pretty
> > much guaranteed to include just about the whole backend...
>
> Could that be fixed by moving the debugging routines into a separate
> set of files, instead of having them lumped in with the code that
> applies those xlog records?
Its a major effort. Those function use elog(), stringinfo and lots of other
stuff... I am hesitant to start working on that.
On the other hand - I think an in-core xlogdump would be great and sensible
thing; but I can live with using my hacked up version that simply links to the
backend...

Greetings,

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 Robert Haas 2012-07-23 16:15:31 Re: [PATCH] XLogReader v2
Previous Message Robert Haas 2012-07-23 16:09:14 Re: sortsupport for text