pg.ddx.io  pgsql-hackers@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: Noah Misch <noah@leadboat.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: DSM segment handle generation in background workers
Date: Wed, 14 Nov 2018 10:25:03 -0500
Message-ID: <7673.1542209103@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=2xEKGUWJadcqXUWQQDfPy-urJ3hgJT50Svj7n8e6st-A@mail.gmail.com>
References: <17043.1539046409@sss.pgh.pa.us>
	<CAEepm=2RqzvRyEXWxq8B9zR8p45tt-xsvA4S8ZNKNwpiUzMVKA@mail.gmail.com>
	<CAEepm=1xxETRCZexNSxkABpNg-65U6Z2pxynJ8V0vURqob+Rqw@mail.gmail.com>
	<9879.1539233472@sss.pgh.pa.us>
	<CAEepm=20PEf5bM3FAtD=CL7x0_WxFXfQ4Se9N9nConKucsr8pg@mail.gmail.com>
	<20181112083358.GA1073796@rfd.leadboat.com>
	<CAEepm=1+1jZiNHuRKaHgKZz1f=RFd8BnFpSgVsxEFNafjsqWZg@mail.gmail.com>
	<32455.1542033541@sss.pgh.pa.us>
	<20181114022435.GC1096408@rfd.leadboat.com>
	<CAEepm=1COuNcj_va0Qt2KTEE4rDvhWCixZ-pyh8iUbrusEVBzQ@mail.gmail.com>
	<20181114053412.GD1096408@rfd.leadboat.com>
	<CAEepm=2xEKGUWJadcqXUWQQDfPy-urJ3hgJT50Svj7n8e6st-A@mail.gmail.com>

Thomas Munro <thomas.munro@enterprisedb.com> writes:
> What do you think about the attached?

I think you need to cast MyStartTimestamp to uint64 before shifting
to ensure portable behavior of the shifts.  In principle it wouldn't
matter because the int64 sign bit is nowhere near the part we care
about, but I've heard some pretty wild claims about what compiler
writers are entitled to do with "undefined" cases.

			regards, tom lane




view thread (19+ messages)  latest in thread

Message-ID: <7673.1542209103@sss.pgh.pa.us>
Permalink:  ../7673.1542209103@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7673.1542209103@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, thomas.munro@enterprisedb.com, noah@leadboat.com
  Subject: Re: DSM segment handle generation in background workers
  In-Reply-To: <7673.1542209103@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