pgsql: Remove useless code that propagated FrontendProtocol to a backend

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove useless code that propagated FrontendProtocol to a backend
Date: 2009-08-28 18:23:53
Message-ID: 20090828182353.8843A75331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Remove useless code that propagated FrontendProtocol to a backend via a
PostgresMain switch. In point of fact, FrontendProtocol is already set
in a backend process, since ProcessStartupPacket() is executed inside
the backend --- it hasn't been run by the postmaster for many years.
And if it were, we'd still certainly want FrontendProtocol to be set before
we get as far as PostgresMain, so that startup errors get reported in the
right protocol.

-v might have some future use in standalone backends, so I didn't go so
far as to remove the switch outright.

Also, initialize FrontendProtocol to 0 not PG_PROTOCOL_LATEST. The only
likely result of presetting it like that is to mask failure-to-set-it
mistakes.

Modified Files:
--------------
pgsql/src/backend/postmaster:
postmaster.c (r1.591 -> r1.592)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.591&r2=1.592)
pgsql/src/backend/tcop:
postgres.c (r1.569 -> r1.570)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.569&r2=1.570)
pgsql/src/backend/utils/init:
globals.c (r1.108 -> r1.109)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/globals.c?r1=1.108&r2=1.109)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-08-28 20:26:19 pgsql: Derived files that are shipped in the distribution used to be
Previous Message Tom Lane 2009-08-28 17:42:54 pgsql: Non-Windows EXEC_BACKEND path was broken by recent