pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Increase the number of possible random seeds per time period.
Date: Wed, 14 Nov 2018 23:21:27 -0500
Message-ID: <16659.1542255687@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=1hj-r1Bk_x_jkNnssYeZ+FQi2D_2xjJ-oYwjqtL38Wtw@mail.gmail.com>
References: <E1gN8Ka-0004Gu-Vu@gemulon.postgresql.org>
	<14712.1542253115@sss.pgh.pa.us>
	<CAEepm=1hj-r1Bk_x_jkNnssYeZ+FQi2D_2xjJ-oYwjqtL38Wtw@mail.gmail.com>

Thomas Munro <thomas.munro@enterprisedb.com> writes:
> On Thu, Nov 15, 2018 at 4:38 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Um, this bit is *not* right:

> Will this close the case?

> -       srandom(((unsigned int) MyProcPid) ^
> -                       ((unsigned int) MyStartTimestamp << 12) ^
> -                       ((unsigned int) MyStartTimestamp >> 20));
> +       srandom(((uint64) MyProcPid) ^
> +                       ((uint64) MyStartTimestamp << 12) ^
> +                       ((uint64) MyStartTimestamp >> 20));

WFM.

			regards, tom lane




view thread (4+ messages)

Message-ID: <16659.1542255687@sss.pgh.pa.us>
Permalink:  ../16659.1542255687@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16659.1542255687@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com, tmunro@postgresql.org
  Subject: Re: pgsql: Increase the number of possible random seeds per time period.
  In-Reply-To: <16659.1542255687@sss.pgh.pa.us>
  References: <E1gN8Ka-0004Gu-Vu@gemulon.postgresql.org> <14712.1542253115@sss.pgh.pa.us> <CAEepm=1hj-r1Bk_x_jkNnssYeZ+FQi2D_2xjJ-oYwjqtL38Wtw@mail.gmail.com> <16659.1542255687@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