Re: Support worker_spi to execute the function dynamically.

Masahiro Ikeda <ikedamsh@oss.nttdata.com>

From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Date: 2023-07-24T01:04:39Z
Lists: pgsql-hackers
On 2023-07-22 01:05, Bharath Rupireddy wrote:
> On Fri, Jul 21, 2023 at 4:05 PM Masahiro Ikeda 
> <ikedamsh@oss.nttdata.com> wrote:
>> (2)
>> 
>> Do we need "worker_spi.total_workers = 0" and
>> "shared_preload_libraries = worker_spi" in dynamic.conf.
>> 
>> Currently, the static bg workers will not be launched because
>> "shared_preload_libraries = worker_spi" is removed. So
>> "worker_spi.total_workers = 0" is meaningless.
> 
> You're right. worker_spi.total_workers = 0 in custom.conf has no
> effect. without shared_preload_libraries = worker_spi. Removed that.

OK. If so, we need to remove the following comment in Makefile.

> # enable our module in shared_preload_libraries for dynamic bgworkers

I also confirmed that the tap tests work with meson and make.

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION



Commits

  1. worker_spi: Fix race condition in newly-added TAP tests

  2. worker_spi: Switch to TAP tests

  3. worker_spi: Use term "dynamic" for bgworkers launched with worker_spi_launch()

  4. Fix worker_spi when launching workers without shared_preload_libraries