Re: Passing current_database to BackgroundWorkerInitializeConnection

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Passing current_database to BackgroundWorkerInitializeConnection
Дата
Msg-id 20180402193517.tzbcbmn3ruvpicpg@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Passing current_database to BackgroundWorkerInitializeConnection  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-hackers
Hi,

On 2018-04-02 14:33:54 -0500, Jeremy Finzel wrote:
> Hmmm... not sure if I follow.  My goal is to run a SQL statement every 10
> seconds (or what value is chosen) in a particular database, using a
> background worker.  Those are the two arguments.  Am I missing some way to
> implement this apart from passing those 2 arguments into the launcher
> function?  Is the way to do this properly then to allocate shared memory
> for it, as opposed to trying to pass args into the main function?

Yes, that's the proper way. Allocate shared memory and pass a pointer to
that as the argument.

Greetings,

Andres Freund


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

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: Re: Passing current_database to BackgroundWorkerInitializeConnection
Следующее
От: Robert Haas
Дата:
Сообщение: fdw_startup/tuple_cost vs. parallel_startup/tuple_cost