Re: Would a BGW need shmem_access or database_connection to enumeratedatabases?

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Would a BGW need shmem_access or database_connection to enumeratedatabases?
Дата
Msg-id 8d6a99b8-4dfb-a52b-4079-eba4bdbda6f9@anastigmatix.net
обсуждение исходный текст
Ответ на Re: Would a BGW need shmem_access or database_connection to enumerate databases?  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Would a BGW need shmem_access or database_connection toenumerate databases?
Список pgsql-hackers
On 11/29/2017 05:54 PM, Michael Paquier wrote:

> Yes. That's actually what the autovacuum launcher does. It connects
> using InitPostgres(NULL, InvalidOid, NULL, NULL), and then scans
> pg_database to fetch a list (see get_database_list).

Thanks! It looks like if get_database_list were not static, it
would be just the thing I'm looking for.

Would an SPI query of pg_database also work, in the
bgw-connected-to-null-dbname context? I'm just wondering if
that might be clearer/fewer LOC than just copying the lower-level
approach from get_database_list.

-Chap


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Would a BGW need shmem_access or database_connection to enumerate databases?
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] Issues with logical replication