Re: meson and tmp_install - Mailing list pgsql-hackers

From Nikita Malakhov
Subject Re: meson and tmp_install
Date
Msg-id CAN-LCVOi1j5-EoH=SUuQazTytDkL_eO5dyryKDQy2qo-YY1BaA@mail.gmail.com
Whole thread Raw
In response to Re: meson and tmp_install  (Andres Freund <andres@anarazel.de>)
Responses Re: meson and tmp_install  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi!

Didn't know where to ask, so I've chosen this thread - there is no any
documentation on meson build platform in PostgreSQL docs. Is this
okay? For me it was a surprise when the meson platform was added,
and I have had to spend some time sweeping through meson docs
when I'd added new source files, to build Postgres successfully.

Thanks!

On Tue, Dec 20, 2022 at 8:30 PM Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2022-12-20 07:12:04 -0500, Andrew Dunstan wrote:
> Yesterday when testing a patch I got annoyed when my test failed. I
> tested it like this:
>
>     meson test ldap_password_func/001_mutated_bindpasswd
>
> It turned out that I needed to do this:
>
>     meson test tmp_install ldap_password_func/001_mutated_bindpasswd
>
> The Makefile equivalent ensures that you have a tmp_install without
> having to request to explicitly. It would be nice if we could make meson
> do the same thing, and also honor NO_TEMP_INSTALL if set.

I would like that too, but there's no easy fix that doesn't have
downsides as far as I am aware. We could make the temp install a build
target that the tests depend on, but for historical reasons in meson
that means that the 'all' target depends on temp-install. Which isn't
great.

My current thinking is that we should get away from needing the
temporary install and instead allow to run the tests against the build
directory itself. The temp-install adds a fair bit of overhead and
failure potential. The only reason we need it is that a) initdb and a
few other programs insist that postgres needs to be in the same
directory b) contrib modules currently need to reside in one single
directory.

Greetings,

Andres Freund




--
Regards,
Nikita Malakhov
Postgres Professional 

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Checksum errors in pg_stat_database
Next
From: Andres Freund
Date:
Subject: Re: meson and tmp_install