Re: Configurable location for extension .control files - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Configurable location for extension .control files
Date
Msg-id 55B9F95C.9070609@iki.fi
Whole thread Raw
In response to Re: Configurable location for extension .control files  (Oskari Saarenmaa <os@ohmu.fi>)
List pgsql-hackers
On 07/02/2015 11:37 PM, Oskari Saarenmaa wrote:
> I'm somewhat interested in both #1 & #2 for other projects, but I wrote
> this patch to address #3, i.e. to simplify the test setup we have in
> place for pgmemcache
> (https://github.com/ohmu/pgmemcache/blob/master/localtests.sh) and other
> extensions. I'd like to be able to set up a local PG cluster in /tmp or
> some other location and load the extensions I just built in there.

Now that's a laudable goal. It indeed would be nice to be able to do
"make check" to test an extension, using pgxs. The way "make check"
within the PostgreSQL source tree works is that it performs "make
install" to install PostgreSQL a temporary location, and installs the
extension to that. We can't use "make install" to create a new
PostgreSQL installation in an extension, but perhaps you could have a
substitute of that that copies an existing installation to a temporary
location. I hacked that pgmemcache localtest.sh script to do just that,
see attached. That's usable for pgmemcache as it is, but for a general
facility, you'd need to put that logic into pgxs instead, and it should
also take care of running initdb and starting and stopping the cluster.
But pg_regress can already do those things, so that should be easy.

So, I think that's the direction this should be going. In summary, the
goal is to make "make check" to work for extensions, and the way to do
that is to teach pgxs to create a temporary installation.

- Heikki


Attachment

pgsql-hackers by date:

Previous
From: Rajeev rastogi
Date:
Subject: Re: Autonomous Transaction is back
Next
From: Etsuro Fujita
Date:
Subject: Re: Foreign join pushdown vs EvalPlanQual