Re: multi-install PostgresNode fails with older postgres versions - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: multi-install PostgresNode fails with older postgres versions
Date
Msg-id A8DE97E5-3F50-472A-B8AA-153EE145F8FD@enterprisedb.com
Whole thread Raw
In response to Re: multi-install PostgresNode fails with older postgres versions  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

> On Mar 30, 2021, at 5:52 PM, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, Mar 30, 2021 at 08:44:26PM -0400, Andrew Dunstan wrote:
>> Yeah, it should be validated. All things considered I think just calling
>> 'pg_config --version' is probably the simplest validation, and likely to
>> be sufficient.
>>
>> I'll try to come up with something tomorrow.
>
> There is already TestLib::check_pg_config().  Shouldn't you leverage
> that with PG_VERSION_NUM or equivalent?

Only if you change that function.  It doesn't currently do anything special to run the *right* pg_config.

The patch I sent takes the view that once the install_path has been sanity checked and the *right* pg_config executed,
relyingon the environment's path variables thereafter is safe.  But that means the initial pg_config execution is
uniquein not being able to rely on the path.  There really isn't enough motivation for changing TestLib, I don't think,
becausesubsequent calls to pg_config don't need to be paranoid, just the first call. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: multi-install PostgresNode fails with older postgres versions
Next
From: Michael Paquier
Date:
Subject: Re: Refactor SSL test framework to support multiple TLS libraries