Re: Support worker_spi to execute the function dynamically.

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Support worker_spi to execute the function dynamically.
Дата
Msg-id CALj2ACWQvLCHD6XLACtbzOu1861RbQ0LdpoVpNHJuvYZovsOpw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Support worker_spi to execute the function dynamically.  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Support worker_spi to execute the function dynamically.
Список pgsql-hackers
On Fri, Jul 28, 2023 at 10:15 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> Having each bgworker on its own schema would be enough to prevent
> conflicts, but I'd like to add a second thing: a check on
> pg_stat_activity.wait_event after starting the workers.  I have added
> something like that in the patch I have posted today for the custom
> wait events at [1] and it enforces the startup sequences of the
> workers in a stricter way.
>
> Does the attached take care of your issue?

+# check their existence.  Use IDs that do not overlap with the schemas created
+# by the previous workers.

While using different IDs in tests is a simple fix, -1 for it. I'd
prefer if worker_spi uses different schema prefixes for static and
dynamic bg workers to avoid conflicts. We can either look at
MyBgworkerEntry->bgw_type in worker_spi_main and have schema name as
'{static, dyamic}_worker_schema_%d', id or pass schema name in
bgw_extra.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Support worker_spi to execute the function dynamically.
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Add assertion on held AddinShmemInitLock in GetNamedLWLockTranche()