Re: Atomic rename feature for Windows.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Greg Stark <stark(at)mit(dot)edu>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Victor Spirin <v(dot)spirin(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Atomic rename feature for Windows.
Date: 2022-04-13 15:25:42
Message-ID: 1099038.1649863542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2022-04-13 10:19:44 -0400, Tom Lane wrote:
>> Next decade's hot new processor design might do things
>> differently enough that it matters that we use SpinLockInit()
>> not memset-to-zero. This is not academic either, as we've had
>> exactly such bugs in the past.

> FWIW, I'l like to make spinlocks and atomics assert out if they've not
> been initialized (which'd include preventing uninitialized use of
> lwlocks). It's easy to accidentally zero out the state or start out
> uninitialized. Right now nothing will complain on platforms created
> after 1700 or using --disable-spinlocks --disable-atomics. That should
> be caught well before running on the buildfarm...

Yeah, even just doing that in --disable-spinlocks builds would be
enough for the purpose, and be much more accessible to Joe Developer.

> Then the zero-state assumption wouldn't require continuing to support
> HPPA.

I wouldn't mind retiring that machine once v11 is EOL. (It's also one
of very few animals testing pre-C99 compilers, so not before then.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-04-13 15:25:43 Re: make MaxBackends available in _PG_init
Previous Message Jesper Pedersen 2022-04-13 15:20:40 Re: GSoC 2022: Proposal of pgmoneta on-disk encryption