Re: Support worker_spi to execute the function dynamically.
От | Bharath Rupireddy |
---|---|
Тема | Re: Support worker_spi to execute the function dynamically. |
Дата | |
Msg-id | CALj2ACWR9ncAiDF73unqdJF1dmsA2R0efGXX2624X+YVxcAVWg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Support worker_spi to execute the function dynamically. (Masahiro Ikeda <ikedamsh@oss.nttdata.com>) |
Ответы |
Re: Support worker_spi to execute the function dynamically.
Re: Support worker_spi to execute the function dynamically. |
Список | pgsql-hackers |
On Fri, Jul 21, 2023 at 4:05 PM Masahiro Ikeda <ikedamsh@oss.nttdata.com> wrote: > > > In SQL tests, I ensured worker_spi doesn't start static bg workers by > > setting worker_spi.total_workers = 0. Again, all of this is not > > necessary, but it will be a very good example for someone writing > > extensions and play around with custom config files, SQL and TAP tests > > etc. > > Thanks for making the patch. I confirmed it works in my environments. Thanks for verifying. > I have some questions about the patch. > > (1) > > Do we need to change the minValue from 1 to 0 to support > worker_spi.total_workers = 0? > > DefineCustomIntVariable("worker_spi.total_workers", > "Number of workers.", > NULL, > &worker_spi_total_workers, > 2, > 1, > 100, > PGC_POSTMASTER, > 0, > NULL, > NULL, > NULL); No, let's keep it that way. > (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. > (3) > > We need change and remove them. > > > # Copyright (c) 2021-2023, PostgreSQL Global Development Group > > > > # Test replication statistics data in pg_stat_replication_slots is sane > > after > > # drop replication slot and restart. Modified. I'm attaching the v2 patch. Thoughts? -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Вложения
В списке pgsql-hackers по дате отправления: