Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work
Дата
Msg-id 20130810143024.GN10718@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на BackgroundWorkerInitializeConnection(NULL, ...) doesn't work  (Andrew Tipton <andrew@kiwidrew.com>)
Ответы Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work
Список pgsql-hackers
Andrew Tipton wrote:

> However, should one attempt to pass NULL for the dbname parameter, the
> process will die with:
> 
> FATAL: database 0 does not exist
> 
> BackgroundWorkerInitializeConnection() is essentially just a wrapper around
> InitPostgres(), passing it the supplied dbname and username.  (And passing
> InvalidOid for the dboid parameter.)  When InitPostgres() finds that dbname
> is null, it falls back on dboid.  GetDatabaseTupleByOid() returns NULL when
> given InvalidOid, resulting in the aforementioned elog(FATAL).

Hmm, the intention is that this code path mimics what the autovacuum
launcher does to establish its connection.  It did work at some point;
maybe I broke this before commit.  I will give it a look next week.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal: lob conversion functionality
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work