Re: custom postgres launcher for tests - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: custom postgres launcher for tests
Date
Msg-id CAMsr+YGDrwfvBF3LtJhRL--0mtoM-aqJmdSApS5=VCwWq9xsTg@mail.gmail.com
Whole thread Raw
In response to custom postgres launcher for tests  (Ivan Taranov <i.taranov@postgrespro.ru>)
Responses Re: custom postgres launcher for tests
List pgsql-hackers
On Tue, 11 Feb 2020 at 19:33, Ivan Taranov <i.taranov@postgrespro.ru> wrote:
>
> This patch allow to use custom postgres launcher for tests (tap®ress)
> by setting  environment variable PGLAUNCHER.

I thought I saw a related patch to this that proposed to add a pg_ctl
argument. Was that you too? I can't find it at the moment.

In any case I *very definitely* want the ability to wrap the
'postgres' executable we launch via some wrapper command. I currently
do this with a horrid shellscript hack that uses next-on-path lookups
and a wrapper 'postgres' executable. But because of how
find_other_exec works this is rather far from optimal so I'm a fan of
a cleaner, built-in alternative.

I was initially going to object to using an env-var. But if someone
controls your environment they can already LD_PRELOAD you or PATH-hack
into doing whatever they want, so it's not a security concern. And
you're right that getting a pg_ctl command line or the like into all
the places where we'd want it deep inside TAP tests etc is just too
much hassle otherwise.

I haven't reviewed the code yet, but for the idea a strong +1000 or so.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Memory-Bounded Hash Aggregation
Next
From: John Naylor
Date:
Subject: Re: Portal->commandTag as an enum