Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHiHH-00027f-5d for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 00:52:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHiHG-00023E-O1 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 00:52:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHiHE-00022P-Ep for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 00:52:52 +0000 Received: from smtp2.scorpionshops.com ([82.118.24.230] helo=kilimanjaro.scorpionshops.com) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHiHB-0007iJ-CH for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 00:52:51 +0000 Received: from [192.168.1.4] (92-32-205-89.tn.glocalnet.net [92.32.205.89]) by kilimanjaro.scorpionshops.com (Postfix) with ESMTPSA id 7A8F87BC1AB; Wed, 22 Jul 2015 02:52:47 +0200 (CEST) Message-ID: <55AEE95E.7090304@proxel.se> Date: Wed, 22 Jul 2015 02:52:46 +0200 From: Andreas Karlsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Peter Eisentraut , PostgreSQL-development Subject: Re: [PATCH] Reload SSL certificates on SIGHUP References: <556A6E8A.9030400@proxel.se> <55956342.9050408@gmx.net> In-Reply-To: <55956342.9050408@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 07/02/2015 06:13 PM, Peter Eisentraut wrote: > I think this would be a useful feature, and the implementation looks > sound. But I don't like how the reload is organized. Reinitializing > the context in the sighup handler, aside from questions about how much > work one should do in a signal handler, would cause SSL reinitialization > for unrelated reloads. We have the GUC assign hook mechanism for > handling this sort of thing. The trick would be that when multiple > SSL-related settings change, you only want to do one reinitialization. > You could either have the different assign hooks communicate with each > other somehow, or have them set a "need SSL init" flag that is checked > somewhere else. It is not enough to just add a hook to the GUCs since I would guess most users would expect the certificate to be reloaded if just the file has been replaced and no GUC was changed. To support this we would need to also check the mtimes of the SSL files, would that complexity really be worth it? Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers