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 1gcFeX-0000Om-FL for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Dec 2018 20:19:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gcFeV-00025D-T7 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Dec 2018 20:19:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcFeV-00021c-GC for pgsql-hackers@lists.postgresql.org; Wed, 26 Dec 2018 20:19:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcFeO-0005TV-KF for pgsql-hackers@postgresql.org; Wed, 26 Dec 2018 20:19: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 wBQKJF5g014048; Wed, 26 Dec 2018 15:19:15 -0500 From: Tom Lane To: Peter Geoghegan cc: Alvaro Herrera , Adrien Nayrat , Thomas Munro , Dmitry Dolgov <9erthalion6@gmail.com>, Tomas Vondra , Vik Fearing , Robert Haas , Michael Paquier , David Rowley , Pg Hackers Subject: Re: random() (was Re: New GUC to sample log queries) In-reply-to: References: <20181129214850.kiq6mvofsgplqjdr@alvherre.pgsql> <3859.1545849900@sss.pgh.pa.us> <5659.1545852666@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Wed, 26 Dec 2018 11:56:04 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14046.1545855555.1@sss.pgh.pa.us> Date: Wed, 26 Dec 2018 15:19:15 -0500 Message-ID: <14047.1545855555@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > I'm beginning to think that the technique that I came up with to make > "getting tired" deterministic ought to be supporting as a debugging > option if we're to do away with internal use of the generic/seedable > backend PRNG. I have no objection to providing such a thing as a debug option; I just don't want it to be reachable from SQL (at least not without pieces that aren't there normally, e.g. a loadable C function). Replacing random() might actually make that easier not harder, since we'd have more control over what happens when. regards, tom lane