Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, r(dot)zharkov(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
Date: 2021-03-05 05:42:43
Message-ID: 1443266.1614922963@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Thu, Mar 04, 2021 at 05:14:57PM -0500, Tom Lane wrote:
>> Since the alleged point of this module is to be a prototype for
>> useful background workers, I think we should think of another way.
>> Maybe we need to work a bit harder on passing values from
>> worker_spi_launch to the worker, so that the DB name could be a
>> parameter to worker_spi_launch.

> Yeah, or this is converted to a TAP test where we don't care about
> the database used, but that would consume more cycles without more
> coverage done. Don't we need to worry about the memory context where
> bgw_main_arg is pushed into for dynamic workers?

Yeah, the fact that bgw_main_arg is declared as Datum is really kind
of a lie, because the only thing that actually works there is a pass
by value datatype (not that our docs tell you so).

We could stuff the database name into bgw_extra perhaps, but that
seems restrictive as well. I wonder if there's a reasonable way to
pass over a struct of caller-defined size.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-03-05 06:19:26 Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
Previous Message Michael Paquier 2021-03-05 05:30:20 Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.