From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Ensuring hash tuples are properly maxaligned
Date: Tue, 02 Jan 2018 20:40:50 -0500
Message-ID: <18301.1514943650@sss.pgh.pa.us> (raw)
In-Reply-To: <20180103013300.cf4jermw5ksygm7l@alap3.anarazel.de>
References: <14483.1514938129@sss.pgh.pa.us>
<20180103010931.6vsirlb5pdapdroq@alap3.anarazel.de>
<17454.1514942419@sss.pgh.pa.us>
<CAEepm=1oc+hY_Goh8onmLc1q3KjAFDSeZJ7Ea5wzUc30G4jKhA@mail.gmail.com>
<20180103013300.cf4jermw5ksygm7l@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2018-01-03 14:29:15 +1300, Thomas Munro wrote:
>> On Wed, Jan 3, 2018 at 2:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Andres Freund <andres@anarazel.de> writes:
>>> But note that dsa_pointer can be wider than a regular pointer on
>>> platforms without atomics support.
>>> Hm. I did not get that impression from the comments in dsa.h,
>>> but if it's true then this approach won't work --- and indeed the
>>> hash code would be actively broken in such a case, so it's a problem
>>> we must fix.
>> Maybe Andres is thinking of dsa_pointer_atomic? dsa_pointer is
>> normally the size of a pointer (well, really, the size of size_t),
>> though it could be *narrower* if you don't have atomics or ask for it
>> with USE_SMALL_DSA_POINTER
> Yep, I was.
OK, then there's not a live bug, but I'm a bit tempted to get rid of
the data[] member anyway. It's not clear to me now that keeping it
results in net cleaner code. Thoughts?
regards, tom lane
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, andres@anarazel.de, thomas.munro@enterprisedb.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Ensuring hash tuples are properly maxaligned
In-Reply-To: <18301.1514943650@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