Re: ERROR: invalid spinlock number: 0 - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: ERROR: invalid spinlock number: 0
Date
Msg-id CA+hUKG+tZHpADD_BsPp=c3EiYeenTTx5AxsZVGkv1mA0J3O21w@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: invalid spinlock number: 0  (Michael Paquier <michael@paquier.xyz>)
Responses Re: ERROR: invalid spinlock number: 0
List pgsql-hackers
On Mon, Feb 15, 2021 at 9:27 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Thu, Feb 11, 2021 at 11:30:13PM +0900, Fujii Masao wrote:
> > Yes, so what about the attached patch?
>
> I see.  So the first error triggering the spinlock error would cause
> a transaction failure because the fallback implementation of atomics
> uses a spinlock for this variable, and it may not initialized in this
> code path.

Why not initialise it in WalRcvShmemInit()?



pgsql-hackers by date:

Previous
From: Zohar Gofer
Date:
Subject: pg_replication_origin_session_setup and superuser
Next
From: Noah Misch
Date:
Subject: Re: increase size of pg_commit_ts buffers