pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Subject: Re: Removing --disable-strong-random from the code
Date: Sun, 30 Dec 2018 01:45:42 -0500
Message-ID: <23371.1546152342@sss.pgh.pa.us> (raw)
In-Reply-To: <20181230063219.GG608@paquier.xyz>
References: <20181230063219.GG608@paquier.xyz>

Michael Paquier <michael@paquier.xyz> 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




view thread (10+ messages)  latest in thread

Message-ID: <23371.1546152342@sss.pgh.pa.us>
Permalink:  ../23371.1546152342@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23371.1546152342@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org, hlinnaka@iki.fi
  Subject: Re: Removing --disable-strong-random from the code
  In-Reply-To: <23371.1546152342@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox