Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdUrn-0000Xf-Oj for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Dec 2018 06:46:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdUrk-0005iV-RC for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Dec 2018 06:46:28 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdUrk-0005iO-K0 for pgsql-hackers@lists.postgresql.org; Sun, 30 Dec 2018 06:46:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdUrd-0005lA-3R for pgsql-hackers@lists.postgresql.org; Sun, 30 Dec 2018 06:46:27 +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 wBU6jgtg023372; Sun, 30 Dec 2018 01:45:42 -0500 From: Tom Lane To: Michael Paquier cc: Postgres hackers , Heikki Linnakangas Subject: Re: Removing --disable-strong-random from the code In-reply-to: <20181230063219.GG608@paquier.xyz> References: <20181230063219.GG608@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Sun, 30 Dec 2018 15:32:19 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23370.1546152342.1@sss.pgh.pa.us> Date: Sun, 30 Dec 2018 01:45:42 -0500 Message-ID: <23371.1546152342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > Attached is a patch to clean up the code, which removes all the code > specific to random generation for backends (no more shmem code paths > and such), as well as the pg_frontend_random() and > pg_backend_random(). Thoughts or opinions? Hah, I was just about to work on that myself --- glad I didn't get to it quite yet. A couple of thoughts: 1. Surely there's documentation about --disable-strong-random to clean up too? 2. I wonder whether it's worth adding this to port.h: extern bool pg_strong_random(void *buf, size_t len); +/* pg_backend_random used to be a wrapper for pg_strong_random */ +#define pg_backend_random pg_strong_random to prevent unnecessary breakage in extensions that might be depending on pg_backend_random. 3. Didn't look, but the MSVC build code might need a tweak too now that pg_strong_random.o is built-always rather than conditional? regards, tom lane