Re: pgxs: build infrastructure for extensions v2

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pgxs: build infrastructure for extensions v2
Date: 2004-07-02 15:39:39
Message-ID: Pine.LNX.4.58.0407021703370.27076@sablons.cri.ensmp.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Dear Peter,

> > If you cannot compile extensions before postgresql is already installed,
>
> That assumption is wrong. The contrib modules can be built at the same
> time as the rest of the tree, before any installation takes place.
> This is essential for packaging: When a package is built, the tree is
> never really installed.

The model I have in mind is the one of apache, where you use "apxs -c -i
... mod_foo.c" to install a new module AFTER apache has been compiled and
installed, and it's not a problem to anyone there.

So I must admit I'm not sure I understand the package building issue.

The whole point of PGXS is to enable the ability to install a contrib
or external module whenever one needs it, but not necessary at "initial"
build time.

As a side effect, because it relies on "pg_contrib" and other files being
installed, then it suggests that the "make" in contrib can only be made
after postgresql is installed, as it is with apache.

> > > - In Makefile.global: -L$(pkglibdir) is not necessary. There are not
> > > libraries to link at build time in there.
> >
> > It is done only "ifdef PGXS", in which case it seems to me that
> > this is really needed, as it is at extension-building time.
>
> There are by definition never any build-time linkable files in $(pkglibdir).

PGXS is by definition to be used AFTER the postgresql installation. Thus
the "build-time" when using is necessary AFTER postgresql has been
installed. So I think that the libraries are expected to be in
$(pkglibdir)? Or am I completly misunderstanding you?

> > - maybe more files should be copied? if so which ones?
>
> Actually you might copy less files. You don't need to copy everything under
> src/makefiles/. It is enough to copy Makefile.port, since you already know
> the platform.

Ok. I can look at that. "Makefile.port" is a symbolic link, so it may
depends whether the "install.sh" copies the link as a file or as a link.

Thanks for your comments,

--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2004-07-02 16:17:38 Re: pg_tablespace_databases
Previous Message Andrew Dunstan 2004-07-02 15:07:50 plperl support for older perl versions