Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it
Date
Msg-id 20130108211312.GF10185@awork2.anarazel.de
Whole thread Raw
In response to Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 2013-01-08 23:02:15 +0200, Heikki Linnakangas wrote:
> On 08.01.2013 23:00, Andres Freund wrote:
> >>Note that the xlogreader facility doesn't need any more emulation. I'm quite
> >>satisfied with that part of the patch now. However, the rmgr desc routines
> >>do, and I'm not very happy with those. Not sure what to do about it. As you
> >>said, we could add enough infrastructure to make them compile in frontend
> >>context, or we could try to make them rely less on backend functions.
> >
> >Which emulation needs are you missing in the desc routines besides
> >relpathbackend() and timestamptz_to_str()? pfree() is "just" needed
> >because its used to free the result of relpathbackend(). No own pallocs,
> >no ereport ...
>
> Nothing besides those, those are the stuff I was referring to.

Yea :(. As I said, I think its reasonable to emulate the former but
timestamptz_to_str() seems too be too complex for that.

Extracting the whole datetime/timestamp handling into a backend
independent "module" seems like complex overkill to me although it might
be useful to reduce the duplication of all that code in ecpg. (which
deviated quite a bit by now). No idea how to solve that other than
returning placeholder data atm.

Greetings,

Andres Freund

--Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade regression test litters the source tree with log files
Next
From: Peter Eisentraut
Date:
Subject: Re: json api WIP patch