From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Should we cacheline align PGXACT?
Date: Fri, 19 Aug 2016 11:46:00 -0400
Message-ID: <19065.1471621560@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdtcOhd-EcohXJpgLM66U2_86yhSp8ERWnqeMqKqWyqz9Q@mail.gmail.com>
References: <CAPpHfdtJY4zOEDsjad6J5AyZMqZcv6gSY9AkKpA7qN3jyQ2+1Q@mail.gmail.com>
<31991.1471614372@sss.pgh.pa.us>
<CAPpHfdtcOhd-EcohXJpgLM66U2_86yhSp8ERWnqeMqKqWyqz9Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> On Fri, Aug 19, 2016 at 4:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That's one mighty ugly patch. Can't you do it without needing to
>> introduce the additional layer of struct nesting?
> That's worrying me too.
> We could use anonymous struct, but it seems to be prohibited in C89 which
> we stick to.
> Another idea, which comes to my mind, is to manually calculate size of
> padding and insert it directly to PGXACT struct. But that seems rather
> ugly too. However, it would be ugly definition not ugly usage...
> Do you have better ideas?
No, that was the best one that had occurred to me, too. You could
probably introduce a StaticAssert that sizeof(PGXACT) is a power of 2
as a means of checking that the manual padding calculation hadn't
gotten broken.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.korotkov@postgrespro.ru
Subject: Re: Should we cacheline align PGXACT?
In-Reply-To: <19065.1471621560@sss.pgh.pa.us>
References: <CAPpHfdtJY4zOEDsjad6J5AyZMqZcv6gSY9AkKpA7qN3jyQ2+1Q@mail.gmail.com> <31991.1471614372@sss.pgh.pa.us> <CAPpHfdtcOhd-EcohXJpgLM66U2_86yhSp8ERWnqeMqKqWyqz9Q@mail.gmail.com> <19065.1471621560@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