Re: [BUGS] BUG #2401: spinlocks not available on amd64 - Mailing list pgsql-patches

From Tom Lane
Subject Re: [BUGS] BUG #2401: spinlocks not available on amd64
Date
Msg-id 26185.1146339268@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #2401: spinlocks not available on amd64  (Theo Schlossnagle <jesus@omniti.com>)
Responses Re: [BUGS] BUG #2401: spinlocks not available on amd64  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Theo Schlossnagle <jesus@omniti.com> writes:
> I'd remind everyone that the spinlock stuff is entirely optional at
> build time.

Not really.  The performance hit for not having hardware spinlocks is
so severe that it's not considered a reasonable fallback.

> I also think it immensely useful to replace all of the tas subsystem
> with cas so that one could reliabily lock these atomics with the process
> id of the locker.

I cannot, ever once in my years working on Postgres, remember having
wanted such a thing.  I am strongly against mucking with the spinlock
code for mere aesthetics --- it's too fragile and hard to test,
especially on platforms you don't have ready access to.

In short, it ain't broken and we don't need to fix it.

            regards, tom lane

pgsql-patches by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Cleaning up multiply-defined-symbol warnings on OS X
Next
From: Tom Lane
Date:
Subject: Re: Patch for BUG #2073: Can't drop sequence when created