Re: PostgreSQL for VAX on NetBSD/OpenBSD - Mailing list pgsql-hackers

From Greg Stark
Subject Re: PostgreSQL for VAX on NetBSD/OpenBSD
Date
Msg-id CAM-w4HOTUViNRZHgp-L7tbWrdRwQoOvyJ2AzBuOc=jQ5etG0Lg@mail.gmail.com
Whole thread Raw
In response to PostgreSQL for VAX on NetBSD/OpenBSD  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jul 17, 2014 at 4:04 PM, Johnny Billquist <bqt@update.uu.se> wrote:
> Also, VAX did not use CAS as the general paradigm for atomic writes and so
> on, but have other explicit instructions that are guaranteed to be atomic.
> NetBSD/vax don't use the VAX specific instructions, but emulates CAS in the
> kernel instead. But I don't remember how that extends to userland. It's
> obviously easiest if userland programs use the pthread library functions,
> which are guaranteed to work right even in multiprocessor environment.

pthread functions may work by accident in shared memory but there's no
way to be sure they won't depend on some pthread threading data
structures. In short, if you don't use pthreads you can't really count
on pthread functions to work.

We did experiment a while back with using futexes on Linux instead of
our spinlocks but the experiments didn't seem to work out.

-- 
greg



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: PostgreSQL for VAX on NetBSD/OpenBSD
Next
From: Christoph Berg
Date:
Subject: Re: [TODO] Process pg_hba.conf keywords as case-insensitive