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

From Ivan N. Taranov
Subject Re: custom postgres launcher for tests
Date
Msg-id CAKqLMA9+na+wPsoEhCX8Jr=3FsbEZqk9myLPeRU4YMC46yiaMQ@mail.gmail.com
Whole thread Raw
In response to Re: custom postgres launcher for tests  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: custom postgres launcher for tests
List pgsql-hackers
On Fri, Feb 21, 2020 at 4:49 AM Craig Ringer <craig@2ndquadrant.com> wrote:

> 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.

This very simple two-line patch for src/test/perl/PostgresNode.pm code,
it set `pg_ctl -p <path>`  argument, and one-line patch for
src/test/regress/pg_regress.c it spawn postgres-launcher directly.

This routine usable only for tap tests with used
PostgresNode::get_new_node/start/restart, and for regress tests.

Perhaps the name TEST_PGLAUNCHER is more correct for this env-var.

>into doing whatever they want, so it's not a security concern

>I currently do this with a horrid shellscript hack that uses next-on-path
>lookups and a wrapper 'postgres' executable

Its not security problem, because this kit only for developer, commonly - for
iteratively build and run concrete tests.

For more complexy replacing need patch for pg_ctl, or postgres wrapper, or
replacing postgres bin  and other ways...

Thanks for the response!



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: pg_regress cleans up tablespace twice.