Re: pgsql: Add pg_atomic_unlocked_write_u64 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgsql: Add pg_atomic_unlocked_write_u64
Date
Msg-id 1139398.1764872155@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add pg_atomic_unlocked_write_u64  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Add pg_atomic_unlocked_write_u64
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> How about:

> /*
>  * pg_atomic_unlocked_write_u32 - unlocked write to atomic variable.
>  *
>  * Write to an atomic variable, without atomicity guarantees. I.e. it is not
>  * guaranteed that a concurent reader will not see a torn value, nor to

grammar police: s/nor to/nor is this/

>  * guaranteed to correctly interact with concurrent read-modify-write
>  * operations like pg_atomic_compare_exchange_u32.  This should only be used
>  * in cases where minor performance regressions due to atomic operations are
>  * unacceptable and where exclusive access is guaranteed due to some external
>  * means.
>  *
>  * No barrier semantics.
>  */

LGTM otherwise.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Re: bt_index_parent_check and concurrently build indexes
Next
From: Robert Haas
Date:
Subject: Re: apply_scanjoin_target_to_paths and partitionwise join