Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bw9FR-0003zm-37 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Oct 2016 14:50:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bw9FQ-0005Uc-B5 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Oct 2016 14:50:40 +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_2) (envelope-from ) id 1bw9FP-0005UV-NL for pgsql-hackers@postgresql.org; Mon, 17 Oct 2016 14:50:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bw9FM-00028P-6H for pgsql-hackers@postgresql.org; Mon, 17 Oct 2016 14:50:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9HEoN8I026592; Mon, 17 Oct 2016 10:50:24 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Replace PostmasterRandom() with a stronger way of generating ran In-reply-to: References: Comments: In-reply-to Heikki Linnakangas message dated "Mon, 17 Oct 2016 08:53:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26590.1476715823.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 17 Oct 2016 10:50:23 -0400 Message-ID: <26591.1476715823@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) 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 Heikki Linnakangas writes: > Replace PostmasterRandom() with a stronger way of generating randomness. This patch broke padmeleon: 016-10-17 09:57:17.782 EDT [5804d8bd.57c2:1] LOG: database system was shut= down at 2016-10-17 09:57:17 EDT 2016-10-17 09:57:17.790 EDT [5804d8bd.57c2:2] LOG: MultiXact member wrapar= ound protections are now enabled 2016-10-17 09:57:17.807 EDT [5804d8bd.57c6:1] LOG: autovacuum launcher sta= rted 2016-10-17 09:57:17.820 EDT [5804d8bd.57bf:1] LOG: database system is read= y to accept connections 2016-10-17 09:57:18.516 EDT [5804d8bd.57bf:2] LOG: could not generate rand= om query cancel key 2016-10-17 09:57:19.544 EDT [5804d8bd.57bf:3] LOG: could not generate rand= om query cancel key 2016-10-17 09:57:20.563 EDT [5804d8bd.57bf:4] LOG: could not generate rand= om query cancel key 2016-10-17 09:57:21.584 EDT [5804d8bd.57bf:5] LOG: could not generate rand= om query cancel key 2016-10-17 09:57:22.604 EDT [5804d8bd.57bf:6] LOG: could not generate rand= om query cancel key It's failing because this machine lacks /dev/random and /dev/urandom. It does have a non-kernel entropy daemon (prngd), which OpenSSL knows how to read from but the hard-wired code in pg_strong_random() does not. I'm not sure whether it's worth trying to make pg_strong_random() aware of prngd. The real issue here is whether we are willing to say that Postgres simply does not work anymore on machines without standard entropy sources. Doesn't matter whether the user cares about the strength of cancel keys, we're just blowing them off. That seems a bit extreme from here. I think we should be willing to fall back to the old code if we can't find a real entropy source. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers