pgsql: Move processing of startup-packet switches and GUC settings into

Lists: pgsql-committerspgsql-hackers
From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move processing of startup-packet switches and GUC settings into
Date: 2009-09-01 00:09:42
Message-ID: 20090901000942.EB90975331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

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.

Modified Files:
--------------
pgsql/src/backend/tcop:
postgres.c (r1.571 -> r1.572)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.571&r2=1.572)
pgsql/src/backend/utils/init:
postinit.c (r1.196 -> r1.197)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c?r1=1.196&r2=1.197)
pgsql/src/include:
miscadmin.h (r1.213 -> r1.214)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/miscadmin.h?r1=1.213&r2=1.214)
pgsql/src/include/tcop:
tcopprot.h (r1.99 -> r1.100)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/tcop/tcopprot.h?r1=1.99&r2=1.100)


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Move processing of startup-packet switches and GUC settings into
Date: 2009-09-01 13:49:04
Message-ID: 20090901134903.GA7243@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Move processing of startup-packet switches and GUC settings into
Date: 2009-09-01 14:11:37
Message-ID: 13939.1251814297@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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