From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: r.zharkov@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
Date: Fri, 05 Mar 2021 00:42:43 -0500
Message-ID: <1443266.1614922963@sss.pgh.pa.us> (raw)
In-Reply-To: <YEHB7A2c+qzpZ2+J@paquier.xyz>
References: <20210304211356.GA21621@alvherre.pgsql>
<1418361.1614896097@sss.pgh.pa.us>
<YEHB7A2c+qzpZ2+J@paquier.xyz>
Michael Paquier <michael@paquier.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, alvherre@alvh.no-ip.org, r.zharkov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
In-Reply-To: <1443266.1614922963@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox