Re: Atomic rename feature for Windows. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Atomic rename feature for Windows.
Date
Msg-id CA+TgmoaJNXw_B1jjF9g6vFx3Rr=9XcSNEtiHzfAt8jb_kFOrnw@mail.gmail.com
Whole thread Raw
In response to Re: Atomic rename feature for Windows.  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Atomic rename feature for Windows.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Apr 13, 2022 at 3:04 AM Michael Paquier <michael@paquier.xyz> wrote:
> Agreed.  I think that things can be usually helpful.  Now, I am not
> really convinced that there is a strong need in running a VAX if you
> are worrying about timing issues so this is a matter of balance.  You
> could get down to the same level of coverage with something as cheap
> as a Raspberry PI or such.  There are also configure switches that
> emulate rather non-common behaviors, like --disable-spinlocks or
> --disable-atomics that I'd rather never see gone.

I don't really agree with you about any of this.

A Raspberry Pi running Linux is very similar to any other Linux
machine, except with less resources. A machine running a different
operating system is a totally different thing. I agree that there is
value in supporting other operating systems if those are things people
might actually use, because it's good for PostgreSQL to be portable,
but it isn't really useful for us to be portable to systems that
nobody runs any more. I am just old enough to have a bit of nostalgia
about the idea of surrendering support for VAX or a PDP-11 or an IRIX
workstation, but in practice efforts to port to those platforms are
efforts for the dedicated hobbyist rather than anything that will make
PostgreSQL a better piece of software.

Similarly for spinlocks and atomics. There have been in the past
systems that did not have these things, but it seems very unlikely
that there will be new systems in the future that don't have these
things. And continuing to support those configurations actually adds a
lot of complexity. The code is weirdly structured so that you can
emulate atomics with spinlocks, but spinlocks on most systems are
actually built using atomics, except when we emulate spinlocks with
semaphores. It's really kind of a mess, and we could clean things up
and make them more straightforward if we were willing to decide that
atomics and spinlocks are basic requirements for PostgreSQL to run.

Now I don't know if we should decide that today or at some point in
the future, but single-processor architectures are pretty dead.
Embedded devices like phones are shipping with multiple cores. Even a
single processor system is probably based on an underlying
architecture that is multiprocessor capable. Where, outside of a
museum, would you find a system that required --disable-spinlocks or
--disable-atomics?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: JSON docs: RFC7159 is now superceded
Next
From: Tom Lane
Date:
Subject: Re: JSON docs: RFC7159 is now superceded