On Wed, Dec 12, 2012 at 5:19 PM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 12 December 2012 22:11, Mikko Tiihonen
> <mikko.tiihonen@nitorcreations.com> wrote:
>> noticed a "XXX: It might be worth considering using an atomic fetch-and-add
>> instruction here, on architectures where that is supported." in lock.c
>>
>> Here is my first try at using it.
>
> That's interesting, but I have to wonder if there is any evidence that
> this *is* actually helpful to performance.
Ditto. I've had at least one bad experience with an attempted change
to this sort of thing backfiring. And it's possible that's because my
implementation sucked, but the only concrete evidence of that which I
was able to discern was bad performance. So I've learned to be
skeptical of these kinds of things unless there are clear benchmark
results.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company