Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date: 2016-04-12 19:13:39
Message-ID: BLU437-SMTP18AE4D91882E065E191AE3F2950@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2016-04-12 07:00, Andres Freund wrote:
> On 2016-04-12 00:32:13 -0400, Tom Lane wrote:
>> I wrote:
>>> This commit has broken buildfarm member gaur, and no doubt pademelon
>>> will be equally unhappy once it catches up to HEAD.
>>
>> Spoke too soon, actually: pademelon did not get as far as initdb.
>>
>> cc: "bufmgr.c", line 4032: error 1521: Incorrect initialization.
>> cc: "bufmgr.c", line 4058: error 1521: Incorrect initialization.
>>
>> Apparently, assigning the result of init_spin_delay() is not as portable
>> as you thought.
>
> Hm. I'm not sure why not though? Is it because delayStatus isn't static
> or global scope?

It's because C89 requires initializers for aggregate and union types to
be constant expressions (3.5.7p3):
> All the expressions in an initializer for an object that has static
> storage duration or in an initializer list for an object that has
> aggregate or union type shall be constant expressions.

C99 removes this constraint (6.7.8p4):
> All the expressions in an initializer for an object that has static storage duration shall be
> constant expressions or string literals.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2016-04-12 19:17:12 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Previous Message Andres Freund 2016-04-12 18:59:06 Re: pgsql: Add the "snapshot too old" feature

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2016-04-12 19:17:12 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Previous Message Andres Freund 2016-04-12 18:59:06 Re: pgsql: Add the "snapshot too old" feature