Re: Shuffling xlog header files

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Shuffling xlog header files
Date: 2012-12-12 04:41:12
Message-ID: 20121212044111.GA3887@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> Andres Freund's xlogreader patch contains a change to move the
> declarations of SQL-callable functions in xlogfuncs.c to a new
> header file, xlog_fn.h. The purpose is to allow xlog_internal.h to
> be included in a frontend program, as the PG_FUNCTION_ARGS and Datum
> used in the prototypes require fmgr.h, which is backend-only. I
> think his patch missed a trick: pg_basebackup, pg_controlinfo and
> pg_resetxlog currently use this for the same purpose:

Yeah, I noticed that after I proposed that. I furthermore realized that
the whole xlog.h / xlog_internal.h split wasn't thorough enough; I think
there's some more useful reshuffling to be done in the xlog headers; in
particular I considered the idea that backend .c files that only need to
build and insert xlog records could use a very lean header that defined
only enough to get that task done, while others such as checkpointer,
walreceiver and sender (probably others) would require the more
extensive header.

I was a bit pressed for time so didn't get around to actually trying it
out.

So I don't object to your patch, but I do think that maybe we can go
even a bit further than this.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2012-12-12 07:07:14 Fix fmgroids.h not regenerated after "clean" (not "clean dist") on Windows
Previous Message Josh Kupershmidt 2012-12-12 04:25:43 Re: Multiple --table options for other commands