Re: Xlogprefetcher: Use atomic add for increment counter

2025-11-07 Thread Ranier Vilela
Em sex., 7 de nov. de 2025 às 11:59, Andres Freund escreveu: > On 2025-11-07 11:52:37 -0300, Ranier Vilela wrote: > > Em sex., 7 de nov. de 2025 às 11:41, Andres Freund > > escreveu: > > > On 2025-11-07 11:28:06 -0300, Ranier Vilela wrote: > > > > Use pg_atomic_fetch_add_u64 to replace pg_atomic

Re: Xlogprefetcher: Use atomic add for increment counter

2025-11-07 Thread Andres Freund
On 2025-11-07 11:52:37 -0300, Ranier Vilela wrote: > Em sex., 7 de nov. de 2025 às 11:41, Andres Freund > escreveu: > > On 2025-11-07 11:28:06 -0300, Ranier Vilela wrote: > > > Use pg_atomic_fetch_add_u64 to replace pg_atomic_read_u64 and > > > pg_atomic_write_u64 calls. > > > > > > This simplifie

Re: Xlogprefetcher: Use atomic add for increment counter

2025-11-07 Thread Ranier Vilela
Em sex., 7 de nov. de 2025 às 11:41, Andres Freund escreveu: > Hi, > > On 2025-11-07 11:28:06 -0300, Ranier Vilela wrote: > > 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 >

Re: Xlogprefetcher: Use atomic add for increment counter

2025-11-07 Thread Andres Freund
Hi, On 2025-11-07 11:28:06 -0300, Ranier Vilela wrote: > 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. How does it do so? As the assertions indica

Xlogprefetcher: Use atomic add for increment counter

2025-11-07 Thread Ranier Vilela
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 use-atomic-add-for-increment-counter.patch Description: B