Re: will override configure parameters if "pgsql" and "postgres" appear anywhere in the source path name

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andy Bailey <bailey(at)akamai(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: will override configure parameters if "pgsql" and "postgres" appear anywhere in the source path name
Date: 2022-07-15 20:25:58
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


On 2022-07-15 20:38:17 +0200, Alvaro Herrera wrote:
> On 2022-Jul-15, Andy Bailey wrote:
> > After some investigation, I found that the value of pkglibdir (as used
> > by src/ and various other places) was different even
> > though the ./configure invocations were identical. Eventually, I found
> > that was the culprit, with some sections like:
> >
> > pkglibdir = $(libdir)
> > ifeq "$(findstring pgsql, $(pkglibdir))" ""
> > ifeq "$(findstring postgres, $(pkglibdir))" ""
> > override pkglibdir := $(pkglibdir)/postgresql
> > endif
> > endif
> Right. See commit 984b0b4df83f and its discussion at [1]. The working
> theory (as I remember it) is that if the installation is already
> postgres-specific (because the user has made it so by having "pgsql" or
> "postgres" in the argument to --prefix), then we don't need to add
> another level of postgres-specificity to it; but otherwise we add
> "/postgresql" to the path so that the resulting files don't end up mixed
> with files installed by unrelated packages.

I think the current approach isn't great.

E.g., putting extension .so's into the same directories as "normal shared
libraries", which typically is either in the library search path via system
configuration, or in the library search path due to rpath, strikes me as quite
wrongheaded. They're not libraries that should be linked to, so they shouldn't
be in the library dir directly.

Nor do we really allow the user to opt in/out of us changing the
user-specified install locations.


Andres Freund

In response to


Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-07-15 21:06:51 Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands
Previous Message Jeff Davis 2022-07-15 19:43:52 Re: [15] Custom WAL resource managers, single user mode, and recovery