Re: [PATCH] Reload SSL certificates on SIGHUP

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, Peter Geoghegan <pg(at)heroku(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Reload SSL certificates on SIGHUP
Date: 2017-01-04 15:01:22
Message-ID: 7fca80da-0274-3f36-eb25-d53f940c1977@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/04/2017 03:48 PM, Magnus Hagander wrote:
> On Wed, Jan 4, 2017 at 3:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> It does not; what would be the point, if the key would be lost at
> SIGHUP?
>
> If we lost it, yes. But we could keep the old key around if it hasn't
> changed, thus behave just like we did in <= 9.6.

That means storing the pass phrase in the memory of the postmaster,
which does not sound like a terribly good idea to me, but I have never
used keys with pass phrases for daemons so it might be a common solution
which is acceptable by many.

> If any of those number of people want to step up and design/implement
> a non-broken solution for passphrases, that'd be fine with me. But
> I would want to see something that's actually a credible solution,
> allowing the postmaster to be started as a normal daemon. And working
> on Windows.
>
> Well, for all those people 9.6 worked significantly better... Because
> they could reload *other* config parameters without failure.

A possible solution might be to only add the error throwing hook when
loading certificates during SIGHUP (and at Windows) and to work as
before on startup. Would that be an acceptable solution? I could write a
patch for this if people are interested.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message web+postgresql 2017-01-04 15:03:01 BUG #14486: Inserting and selecting interval have different constraints
Previous Message Stephen Frost 2017-01-04 14:59:25 Re: [PATCH] Reload SSL certificates on SIGHUP