Thread: pgsql/src backend/libpq/auth.c backend/postmas ...

pgsql/src backend/libpq/auth.c backend/postmas ...

From
Peter Eisentraut - PostgreSQL
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    petere@hub.org    01/06/20 14:07:56

Modified files:
    src/backend/libpq: auth.c
    src/backend/postmaster: postmaster.c
    src/backend/tcop: postgres.c
    src/backend/utils/error: elog.c
    src/backend/utils/init: miscinit.c
    src/include/libpq: auth.h

Log message:
    Handle reading of startup packet and authentication exchange after forking
    a new postmaster child process.  This should eliminate problems with
    authentication blocking (e.g., ident, SSL init) and also reduce problems
    with the accept queue filling up under heavy load.

    The option to send elog output to a different file per backend (postgres -o)
    has been disabled for now because the initialization would have to happen
    in a different order and it's not clear we want to keep this anyway.


Re: pgsql/src backend/libpq/auth.c backend/postmas ...

From
Tom Lane
Date:
Peter Eisentraut - PostgreSQL <petere@hub.org> writes:
>     Handle reading of startup packet and authentication exchange after forking
>     a new postmaster child process.  This should eliminate problems with
>     authentication blocking (e.g., ident, SSL init) and also reduce problems
>     with the accept queue filling up under heavy load.

One question about this --- why did you put the call to
ClientAuthentication() into postgres.c?  Seems like it should be in the
postmaster, probably in DoBackend right after the call to
ProcessStartupPacket.

            regards, tom lane

Re: pgsql/src backend/libpq/auth.c backend/postmas ...

From
Peter Eisentraut
Date:
Tom Lane writes:

> Peter Eisentraut - PostgreSQL <petere@hub.org> writes:
> >     Handle reading of startup packet and authentication exchange after forking
> >     a new postmaster child process.  This should eliminate problems with
> >     authentication blocking (e.g., ident, SSL init) and also reduce problems
> >     with the accept queue filling up under heavy load.
>
> One question about this --- why did you put the call to
> ClientAuthentication() into postgres.c?  Seems like it should be in the
> postmaster, probably in DoBackend right after the call to
> ProcessStartupPacket.

You're probably right.  I put it there when I rewrote the authentication
procedure, before I rewrote the startup handling.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter