From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andrew Tipton <andrew(at)kiwidrew(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work |
Date: | 2013-08-10 14:30:24 |
Message-ID: | 20130810143024.GN10718@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-08-10 14:30:54 | Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work |
Previous Message | Bruce Momjian | 2013-08-10 14:21:02 | Re: Postgres 9.3 beta log |