Re: Issue with the PRNG used by Postgres - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Issue with the PRNG used by Postgres
Date
Msg-id CA+TgmoZHYiTVGnUQGo=0WcaOkLdMPTXx=BMrR4GH+v8uvGjbyA@mail.gmail.com
Whole thread Raw
In response to Re: Issue with the PRNG used by Postgres  (Andres Freund <andres@anarazel.de>)
Responses Re: Issue with the PRNG used by Postgres
List pgsql-hackers
On Thu, Apr 11, 2024 at 5:30 PM Andres Freund <andres@anarazel.de> wrote:
> I don't think that's a particularly apt comparison. If you have spinlocks that
> cannot be acquired within tens of seconds, you're in a really bad situation,
> regardless of whether you crash-restart or not.

I agree with that. I just don't think panicking makes it better.

> > In all seriousness, I'd really like to understand what experience
> > you've had that makes this check seem useful. Because I think all of
> > my experiences with it have been bad. If they weren't, the last good
> > one was a very long time ago.
>
> By far the most of the stuck spinlocks I've seen were due to bugs in
> out-of-core extensions. Absurdly enough, the next common thing probably is due
> to people using gdb to make an uninterruptible process break out of some code,
> without a crash-restart, accidentally doing so while a spinlock is held.

Hmm, interesting. I'm glad I haven't seen those extensions. But I
think I have seen cases of people attaching gdb to grab a backtrace to
debug some problem in production, and failing to detach it within 60
seconds.

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



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: promotion related handling in pg_sync_replication_slots()
Next
From: Tom Lane
Date:
Subject: Re: Issue with the PRNG used by Postgres