public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Bharath Rupireddy <[email protected]>
Cc: Masahiro Ikeda <[email protected]>
Cc: [email protected]
Subject: Re: Support worker_spi to execute the function dynamically.
Date: Fri, 21 Jul 2023 12:08:47 +0900
Message-ID: <ZLn2v/[email protected]> (raw)
In-Reply-To: <CALj2ACV0fr-9OTZqtWu-9XrtUbBZCYb0UK859gfvJ0oqm3YvUA@mail.gmail.com>
References: <[email protected]>
	<ZLiwP5vrT/[email protected]>
	<CALj2ACVOCiXirZFRL-gi7mV2zgdH4e3-vyJQx2fxdzycJTv3qg@mail.gmail.com>
	<[email protected]>
	<CALj2ACWj7qF-YYVi05okBFJnPugkwsM8PSrEwfHs-tQqKO80Uw@mail.gmail.com>
	<[email protected]>
	<CALj2ACV0fr-9OTZqtWu-9XrtUbBZCYb0UK859gfvJ0oqm3YvUA@mail.gmail.com>

On Thu, Jul 20, 2023 at 03:44:12PM +0530, Bharath Rupireddy wrote:
> I don't think that change is correct. The worker_spi essentially shows
> how to start bg workers with RegisterBackgroundWorker and dynamic bg
> workers with RegisterDynamicBackgroundWorker. If
> shared_preload_libraries = worker_spi not specified in there, you will
> miss to start RegisterBackgroundWorkers. Is giving an initidb time
> database name to worker_spi.database work there? If the database for
> bg workers doesn't exist, changing bgw_restart_time from
> BGW_NEVER_RESTART to say 1 will help to see bg workers coming up
> eventually.

Yeah, it does not move the needle by much.  I think that we are
looking at switching this module to use a TAP test in the long term,
instead, where it would be possible to test the scenarios we want to
look at *with* and *without* shared_preload_libraries especially with
the custom wait events for extensions in mind if we add our tests in
this module.

It does not change the fact that Ikeda-san is right about the launch
of dynamic workers with this module being broken, so I have applied v1
with the comment I have suggested.  This will ease a bit the
implementation of any follow-up test scenarios, while avoiding an
incorrect pattern in this template module. 
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, ../ZLn2v%[email protected]/2-signature.asc)
  download

view thread (18+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Support worker_spi to execute the function dynamically.
  In-Reply-To: <ZLn2v/[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox