Re: Passing current_database to BackgroundWorkerInitializeConnection

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Passing current_database to BackgroundWorkerInitializeConnection
Дата
Msg-id 34B484DA-5CAA-4A99-8C91-5231F2F3383B@anarazel.de
обсуждение исходный текст
Ответ на Re: Passing current_database to BackgroundWorkerInitializeConnection  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: Passing current_database to BackgroundWorkerInitializeConnection  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-hackers

On March 30, 2018 3:16:31 PM PDT, Jeremy Finzel <finzelj@gmail.com> wrote:
>> What do you mean with "current database"? Before you
>> BackgroundWorkerInitializeConnection() there is no such thing?
>
>
>My module is based directly off the worker_spi example. The worker is
>dynamically launched via SQL command. But in the worker_spi example,
>the
>database postgres is just hardcoded as the database in which to start
>the
>background worker process. Instead, I want to start it in the database
>in
>which I run the SQL command.

The started worker isn't associated with the original database. You can pass the database oid as an argument to the
launchedbgworker. 

Andres

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


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

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: Re: Passing current_database to BackgroundWorkerInitializeConnection
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility