From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: Tue, 12 Apr 2016 11:52:01 -0400
Message-ID: <3736.1460476321@sss.pgh.pa.us> (raw)
In-Reply-To: <32012.1460472131@sss.pgh.pa.us>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org>
<1881.1460431476@sss.pgh.pa.us>
<4369.1460435533@sss.pgh.pa.us>
<20160412050038.ua2avkwi6dxxcjhx@alap3.anarazel.de>
<32012.1460472131@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> It looks like that compiler adheres to the C89 restriction that an
> initializer for an array or struct must contain only link-time-constant
> expressions, even if the target object is of dynamic scope.
> The macro works with a link-time-constant pointer argument, but not
> with one that must be evaluated at runtime.
It strikes me that that means you could stick with this initialization
method if you made the macro argument be a literal constant string name,
like "buffer spinlock", and printed that rather than the address in
s_lock_stuck. This would be different from what we do now, but not
necessarily any less useful. I'm pretty dubious of the usefulness of
the addresses you're printing right now, because most of them are indeed
not the spinlock itself.
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
In-Reply-To: <3736.1460476321@sss.pgh.pa.us>
References: <E1apSHT-0007xJ-Bh@gemulon.postgresql.org> <1881.1460431476@sss.pgh.pa.us> <4369.1460435533@sss.pgh.pa.us> <20160412050038.ua2avkwi6dxxcjhx@alap3.anarazel.de> <32012.1460472131@sss.pgh.pa.us> <3736.1460476321@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