Xlogprefetcher: Use atomic add for increment counter - Mailing list pgsql-hackers

From Ranier Vilela
Subject Xlogprefetcher: Use atomic add for increment counter
Date
Msg-id CAEudQAoWRScRVqygSfuQmCN=CKQhHXVH_nD=GPQw0sO+UwXz4Q@mail.gmail.com
Whole thread Raw
Responses Re: Xlogprefetcher: Use atomic add for increment counter
List pgsql-hackers
Hi.

Use pg_atomic_fetch_add_u64 to replace pg_atomic_read_u64 and
pg_atomic_write_u64 calls.

This simplifies the logic and this increases the likelihood that the operation will be successful.

patch attached.

best regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement
Next
From: Andres Freund
Date:
Subject: Re: Xlogprefetcher: Use atomic add for increment counter