Re: Support worker_spi to execute the function dynamically.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Support worker_spi to execute the function dynamically.
Дата
Msg-id ZLokkzw6pmvDU9bM@paquier.xyz
обсуждение исходный текст
Ответ на Re: Support worker_spi to execute the function dynamically.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Support worker_spi to execute the function dynamically.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Fri, Jul 21, 2023 at 11:24:08AM +0530, Bharath Rupireddy wrote:
> Okay. Here's a quick patch for adding TAP tests to the worker_spi
> module. We can change it to taste.

What do you think if we removed completely the sql/ test, moving it to
TAP so as we have only one cluster set up when running a make check?
worker_spi.sql only does two waits (one for the initialization and one
to check that the tuple has been processed), so these could be
replaced by some poll_query_until()?

As we have a dynamic.conf, installcheck is not supported so we don't
use anything with this switch.  Besides, updating
shared_preload_libraries and restarting the node in TAP is cheaper
than a second initdb.

-       snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i);
-       snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi");
+       snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi static worker %d", i);
+       snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi static worker");
[..]
-   snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi worker %d", i);
-   snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi");
+   snprintf(worker.bgw_name, BGW_MAXLEN, "worker_spi dynamic worker %d", i);
+   snprintf(worker.bgw_type, BGW_MAXLEN, "worker_spi dynamic worker");

Good idea to split that.
--
Michael

Вложения

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

Предыдущее
От: Gurjeet Singh
Дата:
Сообщение: Re: MERGE ... RETURNING
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: table_open/table_close with different lock mode