Thread: Re: [COMMITTERS] pgsql: Move processing of startup-packet switches and GUC settings into

Tom Lane wrote:
> Log Message:
> -----------
> Move processing of startup-packet switches and GUC settings into InitPostgres,
> to fix the problem that SetClientEncoding needs to be done before
> InitializeClientEncoding, as reported by Zdenek Kotala.  We get at least
> the small consolation of being able to remove the bizarre API detail that
> had InitPostgres returning whether user is a superuser.

So, I think InitPostgres API could be deuglified a bit more by having
the launcher pass the database name instead of the OID.  There's the
small race condition that the launcher could pass a database name and
have it be renamed before the worker starts, but I think it's small
enough to not matter much (note that it's already true that the launcher
could pass a database OID and have it be dropped before the worker
starts).  Is anyone opposed to doing that change?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Alvaro Herrera <alvherre@commandprompt.com> writes:
> So, I think InitPostgres API could be deuglified a bit more by having
> the launcher pass the database name instead of the OID.

Huh?  You mean workers?  Where are they going to get the name from?
The AV shmem structures carry OIDs no?
        regards, tom lane