Re: Support worker_spi to execute the function dynamically.
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Masahiro Ikeda <ikedamsh@oss.nttdata.com>,
pgsql-hackers@lists.postgresql.org
Date: 2023-07-20T04:13:37Z
Lists: pgsql-hackers
On Thu, Jul 20, 2023 at 9:25 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> > In my understanding, the restriction is not required. So, I think it's
> > better to change the behavior.
> > (v1-0001-Support-worker_spi-to-execute-the-function-dynamical.patch)
> >
> > What do you think?
>
> +1. I'm OK to lift this restriction with a SIGHUP GUC for the
> database name and that's not a pattern to encourage in a template
> module. Will do so, if there are no objections.
+1. However, a comment above helps one to understand why some GUCs are
defined before if (!process_shared_preload_libraries_in_progress). As
this is an example extension, it will help understand the reasoning
better. I know we will it in the commit message, but a direct comment
helps:
/*
* Note that this GUC is defined irrespective of worker_spi shared library
* presence in shared_preload_libraries. It's possible to create the
* worker_spi extension and use functions without it being specified in
* shared_preload_libraries. If we return from here without defining this
* GUC, the dynamic workers launched by worker_spi_launch() will keep
* crashing and restarting.
*/
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Commits
-
worker_spi: Fix race condition in newly-added TAP tests
- b68e356a680e 17.0 landed
-
worker_spi: Switch to TAP tests
- 320c311fda91 17.0 landed
-
worker_spi: Use term "dynamic" for bgworkers launched with worker_spi_launch()
- d9eb92c7b122 17.0 landed
-
Fix worker_spi when launching workers without shared_preload_libraries
- 97ff8dd02ca7 17.0 landed