On Sat, Aug 10, 2013 at 10:40 PM, Tom Lane wrote:
> Alvaro Herrera writes:
> > 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.
>
Alvaro Herrera writes:
> 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
> Hmm, the intention is that this code path mimics what the autovacuum
> launcher does to establish its connection.
Andrew Tipton writes:
> The documentation for 9.4 says, in the "Background Worker Processes"
> section:
> Once running, the process can connect to a database by calling
> BackgroundWorkerInitializeConnection(char *dbname, char *username). This
> allows the process to run transactions and queries u
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 usernam
The documentation for 9.4 says, in the "Background Worker Processes"
section:
Once running, the process can connect to a database by calling
BackgroundWorkerInitializeConnection(char *dbname, char *username). This
allows the process to run transactions and queries using the SPI interface.
If dbnam