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

From Piotr Stefaniak
Subject Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Date
Msg-id BLU437-SMTP18AE4D91882E065E191AE3F2950@phx.gbl
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.  (Andres Freund <andres@anarazel.de>)
List 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.





pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Add the "snapshot too old" feature
Next
From: Kevin Grittner
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <