Re: worker_spi.naptime in worker_spi example

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: worker_spi.naptime in worker_spi example
Дата
Msg-id bbdb928f-729e-a50f-96a4-259b12ea8d00@anastigmatix.net
обсуждение исходный текст
Ответ на worker_spi.naptime in worker_spi example  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: worker_spi.naptime in worker_spi example  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-hackers
On 03/15/2018 10:59 AM, Jeremy Finzel wrote:

> WaitLatch function the same variable worker_spi_naptime without referencing
> the configuration created in _PG_init.  Am I missing something here?

You can see the declaration of that variable up on line 56.
It's just an int variable static to worker_spi.c.

The code you saw in _PG_init registers that variable to the
Grand Unified Configuration system (you can see where the address
of the variable, &worker_spi_naptime, is passed in that registration),
so the GUC system can handle setting or querying the value from SQL
(and config files, etc.).

You can read more about the GUC system in
src/backend/utils/misc/README, src/backend/utils/misc/guc.c, and
src/include/utils/guc.h.

-Chap


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: JIT compiling with LLVM v11
Следующее
От: Andres Freund
Дата:
Сообщение: Re: WaitLatchOrSocket optimization