Re: [PATCH] XLogReader v2

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Satoshi Nagayasu <snaga(at)uptime(dot)jp>
Cc: 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 07:19:57
Message-ID: 201207230919.57301.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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+.

> So, I agree with that we need another way to share the code
> between the backend and the related utilities. Any good ideas?
Well, the primary patch in the above email was infrastructure to at least make
reading xlog possible without much internal knowledge. But that will still
leave the debugging routines... Which imo already is too much.

> It would mean that the users using older major version could not take
> advantage of new features and enhancements of the latest xlogdump,
> but it's not what I wanted, actually.
I personally don't see that as a big problem. If xlogdump really reuses the
normal infrastructure of the server the amount of code you need to backport is
*way* much smaller should it ever be actually needed.

> Any contrib module must be able to be built with only the header files
> and the shared libraries when using PGXS. So, it could not assume
> that it has the core source tree. (If we need to assume that, I think
> xlogdump needs to be put into the core/bin directory.)
We possibly could get away by defining an extra .a containing the necessary
object files. Not nice, but...
Imo it *should* be in src/bin though.

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 Alexander Korotkov 2012-07-23 07:37:21 Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Previous Message David Fetter 2012-07-23 04:37:33 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)