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

2013-08-10 Thread Andrew Tipton
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. >

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

2013-08-10 Thread Tom Lane
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.

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

2013-08-10 Thread Tom Lane
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

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

2013-08-10 Thread Alvaro Herrera
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

[HACKERS] BackgroundWorkerInitializeConnection(NULL, ...) doesn't work

2013-08-10 Thread Andrew Tipton
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