Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> I've been looking into the "stuck spin lock" problem under high
> load. Unless it being solved, PostgreSQL would not be usable in the
> "real world."
> Question to hackers: Why does s_lock_stuck() call abort()? Shouldn't
> be elog(ERROR) or elog(FATAL)?
I think that is probably the right thing. elog(ERROR) will not do
anything to release the stuck spinlock, and IIRC not even elog(FATAL)
will. The only way out is to clobber all the backends and reinitialize
shared memory. The postmaster will not do that unless a backend dies
without making an exit report --- which means doing abort().
regards, tom lane