git.postgresql.org Git - postgresql.git/commit
2011年5月28日 23:52:00 +0000 (19:52 -0400)
2011年7月18日 04:49:28 +0000 (00:49 -0400)
commit 3cba8999b343648c4c528432ab3d51400194e93b
Create a "fast path" for acquiring weak relation locks.
When an AccessShareLock, RowShareLock, or RowExclusiveLock is requested
on an unshared database relation, and we can verify that no conflicting
locks can possibly be present, record the lock in a per-backend queue,
stored within the PGPROC, rather than in the primary lock table. This
eliminates a great deal of contention on the lock manager LWLocks.
This patch also refactors the interface between GetLockStatusData() and
pg_lock_status() to be a bit more abstract, so that we don't rely so
heavily on the lock manager's internal representation details. The new
fast path lock structures don't have a LOCK or PROCLOCK structure to
return, so we mustn't depend on that for purposes of listing outstanding
locks.
Review by Jeff Davis.
This is the main PostgreSQL git repository.
RSS
Atom