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

From Alvaro Herrera
Subject Re: multi-install PostgresNode fails with older postgres versions
Date
Msg-id 20210330222201.GA564@alvherre.pgsql
Whole thread Raw
In response to Re: multi-install PostgresNode fails with older postgres versions  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: multi-install PostgresNode fails with older postgres versions  (Mark Dilger <mark.dilger@enterprisedb.com>)
Re: multi-install PostgresNode fails with older postgres versions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 2021-Mar-30, Mark Dilger wrote:

> Once you have a node running, you can query the version using
> safe_psql, but that clearly doesn't work soon enough, since we need
> the information prior to running initdb.

I was thinking something like examining some file in the install dir --
say, include/server/pg_config.h, but that seems messier than just
running pg_config.

> One of the things I noticed while playing with this new toy (thanks,
> Andrew!) is that if you pass a completely insane install_path, you
> don't get any errors.  In fact, you get executables and libraries from
> whatever PATH="/no/such/postgres:$PATH" gets you, probably the
> executables and libraries of your latest development branch.  By
> forcing get_new_node to call the pg_config of the path you pass in,
> you'd fix that problem.  I didn't do that, mind you, but you could.  I
> just executed pg_config, which means you'll still get the wrong
> version owing to the PATH confusion.

Hmm, I think it should complain if you give it a path that doesn't
actually contain a valid installation.

-- 
Álvaro Herrera       Valdivia, Chile
"But static content is just dynamic content that isn't moving!"
                http://smylers.hates-software.com/2007/08/15/fe244d0c.html



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: multi-install PostgresNode fails with older postgres versions
Next
From: Tom Lane
Date:
Subject: Re: "has_column_privilege()" issue with attnums and non-existent columns