Skip site navigation (1) Skip section navigation (2)

Re: Please review: Authentication after fork

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Please review: Authentication after fork
Date: 2001-06-16 18:32:59
Message-ID: 2039.992716379@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Um, shouldn't collection of the startup packet be done after the fork?

> To handle query cancel requests we'd need to take a peek in the
> postmaster, unless we want to start up a new backend for that.

Why?  The PM child will inherit the list of active backends from the
parent, so it could still issue the kill(SIGINT) without any problem
that I can see.  You do have a point: we'll need to generate the
CancelKey for a child much earlier than now, ie, before the fork.
(Drat, a few more cycles in the top postmaster.)  But that doesn't
look like a big problem.  Doesn't really matter if we generate a
cancel key for a child that never becomes a backend.

> Also, I'm not sure how the SSL negotiation would work.

Moving SSL negotiation out of the top process is one of the key points
of this whole change.  AFAIK, SSL negotation is another place where the
postmaster currently blocks on a single client, and thus is a trivial
attack point for DOS attempts.

It's not immediately clear to me whether InitSSL() should be called once
by the top postmaster process or once in each child that sees it is
getting an SSL connection request.  But other than that, I don't see
an issue...

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2001-06-16 23:10:38
Subject: Re: Please review: Authentication after fork
Previous:From: Peter EisentrautDate: 2001-06-16 18:21:44
Subject: Re: Please review: Authentication after fork

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group