Re: Handle TEMP_CONFIG for pg_regress style tests in pg_regress.c

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Handle TEMP_CONFIG for pg_regress style tests in pg_regress.c
Date: 2023-02-19 07:25:57
Message-ID: 48568ed7-1ccd-0ca9-aa31-e51e9df2c99d@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.02.23 21:26, Andres Freund wrote:
> When building with meson, TEMP_CONFIG is supported for TAP tests, but doesn't
> do anything for regress/isolation.
>
> The reason for that is that meson's (and ninja's) architecture is to separate
> "build setup" from the "build/test/whatever" stage, moving dynamism (and more
> costly operations) to the "setup" phase.
>
> In this case the implication is that the command line for the test isn't
> re-computed dynamically. But pg_regress doesn't look at TEMP_CONFIG, it just
> has a --temp-config=... parameter, that src/Makefile.global.in dynamically
> adds if TEMP_CONFIG is set.
>
> In contrast to that, TEMP_CONFIG support for tap tests is implemented in
> Cluster.pm, and thus works transparently.
>
> My inclination is to move TEMP_CONFIG support from the Makefile to
> pg_regress.c. That way it's consistent across the build tools and isn't
> duplicated. pg_regress already looks at a bunch of temporary variables
> (e.g. PG_REGRESS_SOCK_DIR, PG_TEST_USE_UNIX_SOCKETS), so this isn't really
> breaking new ground.

I'm having a hard time understanding what TEMP_CONFIG is for. It
appears that the intention is to allow injecting arbitrary configuration
into the tests? In that case, I think your proposal makes sense. But I
don't see this documented, so who knows what it is actually used for.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Jadhav 2023-02-19 09:57:31 Re: Inconsistency in reporting checkpointer stats
Previous Message Pavel Stehule 2023-02-19 05:40:39 Re: shoud be get_extension_schema visible?