Re: Our "fallback" atomics implementation doesn't actually work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Our "fallback" atomics implementation doesn't actually work
Date
Msg-id 22264.1475874765@sss.pgh.pa.us
Whole thread Raw
In response to Re: Our "fallback" atomics implementation doesn't actually work  (Andres Freund <andres@anarazel.de>)
Responses Re: Our "fallback" atomics implementation doesn't actually work
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> It's not quite there yet, unfortunately. At the moment
> pg_atomic_write_u32() is used for local buffers - and we explicitly
> don't want that to be locking for temp buffers
> (c.f. 6b93fcd149329d4ee7319561b30fc15a573c6307).

Hm.

> Don't really have a great idea about addressing this, besides either
> just living with the lock for temp buffers on fallback platforms (which
> don't have much of a practical relevance), or introduce
> pg_atomic_unlocked_write_u32() or something. Neither seems great.

Maybe we could hack it with some macro magic that would cause
pg_atomic_write_u32() to be expanded into a simple assignment in
localbuf.c only?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Fixing inheritance merge behavior in ALTER TABLE ADD CONSTRAINT
Next
From: Heikki Linnakangas
Date:
Subject: Re: Radix tree for character conversion