Enabling frontend-only xlog "desc" routines - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Enabling frontend-only xlog "desc" routines
Date
Msg-id 20121127184635.GM4227@alvh.no-ip.org
Whole thread Raw
In response to Re: [PATCH 4/8] add simple xlogdump tool  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Enabling frontend-only xlog "desc" routines  (Amit Kapila <amit.kapila@huawei.com>)
Re: Enabling frontend-only xlog "desc" routines  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I mentioned the remaining issues in a previous email (see
message-id 20121025161751.GE6442@alvh.no-ip.org).  Attached is a
patch that enables xlogdump to #include xlog_internal.h by way of
removing that file's inclusion of fmgr.h, which is problematic.  I don't
think this should be too contentious.

The other interesting question remaining is what to do about the rm_desc
function in rmgr.c.  We're split between these two ideas:

1. Have this in rmgr.c:

#ifdef FRONTEND
#define RMGR_REDO_FUNC(func) NULL
#else
#define RMGR_REDO_FUNC(func) func
#endif /* FRONTEND */

and then use RMGR_REDO_FUNC() in the table.


2. Have this in rmgr.c:

#ifndef RMGR_REDO_FUNC
#define RMGR_REDO_FUNC(func) func
#endif

And then have the xlogdump Makefile use -D to define a suitable
RMGR_REDO_FUNC.

Opinions please?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: MySQL search query is not executing in Postgres DB
Next
From: Robert Haas
Date:
Subject: Re: MySQL search query is not executing in Postgres DB