Re: convert various variables to atomics

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: convert various variables to atomics
Date: 2026-07-22 13:06:44
Message-ID: amDAZAVob4DJjUfW@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 22, 2026 at 02:31:49PM +0200, Peter Eisentraut wrote:
> Here is an instance that seems obviously wrong:
>
> /* Buffer id of the buffer that Startup process waits for pin on, or -1 */
> - int startupBufferPinWaitBufId;
> + pg_atomic_uint32 startupBufferPinWaitBufId;

I may just be undercaffeinated, but what is wrong with this case? AFAICT
the casting should work as expected, and I see other examples that do
something similar, like avLauncherProc.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2026-07-22 13:07:20 [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers
Previous Message ZizhuanLiu X-MAN 2026-07-22 13:02:27 Re: support create index on virtual generated column.