Xlogprefetcher: Use atomic add for increment counter

Ranier Vilela <ranier.vf@gmail.com>

From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-07T14:28:06Z
Lists: pgsql-hackers

Attachments

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