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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it
Date: 2013-01-08 21:09:00
Message-ID: 20130108210900.GE10185@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-01-08 15:45:07 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > To what extent do you want palloc et al. emulation? Provide actual pools
> > or just make redirect to malloc and provide the required symbols (at the
> > very least CurrentMemoryContext)?
>
> I don't see any need for memory pools, at least not for frontend
> applications of the currently envisioned levels of complexity. I concur
> with Alvaro's suggestion about just #define'ing them to malloc/free ---
> or maybe better, pg_malloc/free so that we can have a failure-checking
> wrapper.

Unless we want to introduce those into common headers, its more complex
than #define's, you actually need to provide at least
palloc/pfree/CurrentMemoryContext symbols.

Still seems like a shame to do that for one lonely pfree() (+ something
an eventual own implementation of relpathbackend().

> Not sure how we ought to handle elog, but maybe we can put off that bit
> of design until we have a more concrete use-case.

Agreed.

Greetings,

Andres Freund

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-01-08 21:11:41 Re: pg_upgrade regression test litters the source tree with log files
Previous Message Tom Lane 2013-01-08 21:08:42 Re: pg_upgrade regression test litters the source tree with log files