1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Implement new 'lightweight lock manager' that's intermediate between

existing lock manager and spinlocks: it understands exclusive vs shared
lock but has few other fancy features.  Replace most uses of spinlocks
with lightweight locks.  All remaining uses of spinlocks have very short
lock hold times (a few dozen instructions), so tweak spinlock backoff
code to work efficiently given this assumption.  All per my proposal on
pghackers 26-Sep-01.
This commit is contained in:
Tom Lane
2001-09-29 04:02:27 +00:00
parent 818fb55ac4
commit 499abb0c0f
46 changed files with 1595 additions and 1355 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.92 2001/09/27 16:29:12 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.93 2001/09/29 04:02:25 tgl Exp $
*
*
*-------------------------------------------------------------------------
@ -401,11 +401,12 @@ ShutdownPostgres(void)
* since that just raises the odds of failure --- but there's some
* stuff we need to do.
*
* Release any spinlocks or buffer context locks we might be holding.
* Release any LW locks and buffer context locks we might be holding.
* This is a kluge to improve the odds that we won't get into a
* self-made stuck-spinlock scenario while trying to shut down.
* self-made stuck-lock scenario while trying to shut down.
*/
ProcReleaseSpins(NULL);
LWLockReleaseAll();
AbortBufferIO();
UnlockBuffers();
/*