Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work
Date
Msg-id 13994.1376145608@sss.pgh.pa.us
Whole thread Raw
In response to Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work  (Andrew Tipton <andrew@kiwidrew.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> 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.  It did work at some point;
> maybe I broke this before commit.  I will give it a look next week.

I'm pretty sure InitPostgres skips a bunch of stuff if
IsAutoVacuumLauncherProcess().  If you just want to make an environment
equivalent to that process's, maybe those tests should be replaced with
"if (dbname == NULL)".  But the claim that you have access to shared
catalogs in this state is still wrong.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BackgroundWorkerInitializeConnection(NULL, ...) doesn't work
Next
From: Tom Lane
Date:
Subject: Re: Proposal: leave a hint when switching logging away from stderr