Re: EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Martin Goodson <kaemaril(at)googlemail(dot)com>, pgsql-general(at)postgresql(dot)org, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
Date: 2017-05-12 16:30:50
Message-ID: 086c8135-a80c-55cf-2d09-10fe8dca17e1@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/12/2017 09:14 AM, Martin Goodson wrote:
> On 12/05/2017 16:48, Adrian Klaver wrote:
>> On 05/12/2017 08:30 AM, Martin Goodson wrote:
>>> On 12/05/2017 16:18, Joshua D. Drake wrote:
>>

> The EDB installer allows you to specify where to install PostgreSQL, and
> uses /opt/PostgreSQL/<version> for the default. So yeah, mostly :)
>
> My PATH is this:
> /postgresql/software/pg/9.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
>
>
> So it should already be picking up the EDB pg_config :)

Just to be clear you changed the default install location to
/postgresql/software/pg/9.6.2, correct?

>
> For comparison purposes, here's pg_config when run from the cluster
> owner (testdb), which should pick up pg_config from the EnterpriseDB
> settings:
>
> (testdb(at)repm:/postgresql/software/repmgr/repmgr-3.3.1$ type pg_config

Alright that is the EDB pg_config.

>
> And THIS is the output of pg_config when run from another user:
>
> (master(at)repm:~/repmgr-3.3.1$ type pg_config
> pg_config is hashed (/usr/bin/pg_config) )

The Ubuntu/Debian packages.

>
> Should I have to somehow override any of that? Surely, if EnterpriseDB
> was built with the libs it specifies there I should be able to reference
> them?
>
> Current output is:
> testdb(at)repm:/postgresql/software/repmgr/repmgr-3.3.1$ sudo make
> USE_PGXS=1 install

Note the sudo, that changes you into a new environment that is not
seeing your $PATH:

/postgresql/software/pg/9.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin

Hence my previous suggestion(***CORRECTED***):

PATH=<path to EDB pg_config>:$PATH make USE_PGXS=1 clean all
sudo PATH=<path to EDB pg_config>:$PATH make USE_PGXS=1 install

It is broken down into two steps, so the first step will clean up any
previous attempts before going forward.

>
> As mentioned : I don't have much experience with compiling on linux, so
> I may be missing something horribly obvious :)
>
> Martin.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-05-12 17:57:50 Re: EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
Previous Message Martin Goodson 2017-05-12 16:19:17 Re: EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.