diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-04 20:21:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-04 20:21:07 +0000 |
commit | 5d5087363d7cdbd00fc432a1216e83a00f7139bd (patch) | |
tree | 56492be3beb9be188f37bfa68c9bfc0e35b0961c /src/backend/utils/resowner/resowner.c | |
parent | 5592a6cf46d60187b6f4895d2144e67d4f54fa25 (diff) | |
download | postgresql-5d5087363d7cdbd00fc432a1216e83a00f7139bd.tar.gz |
Replace the BufMgrLock with separate locks on the lookup hashtable and
the freelist, plus per-buffer spinlocks that protect access to individual
shared buffer headers. This requires abandoning a global freelist (since
the freelist is a global contention point), which shoots down ARC and 2Q
as well as plain LRU management. Adopt a clock sweep algorithm instead.
Preliminary results show substantial improvement in multi-backend situations.
Diffstat (limited to 'src/backend/utils/resowner/resowner.c')
-rw-r--r-- | src/backend/utils/resowner/resowner.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c index 5f1f99f703..f3063ed9d9 100644 --- a/src/backend/utils/resowner/resowner.c +++ b/src/backend/utils/resowner/resowner.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.9 2004/12/31 22:02:50 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.10 2005/03/04 20:21:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -200,12 +200,7 @@ ResourceOwnerReleaseInternal(ResourceOwner owner, * that would indicate failure to clean up the executor correctly --- * so issue warnings. In the abort case, just clean up quietly. * - * XXX this is fairly inefficient due to multiple BufMgrLock - * grabs if there are lots of buffers to be released, but we - * don't expect many (indeed none in the success case) so it's - * probably not worth optimizing. - * - * We are however careful to release back-to-front, so as to + * We are careful to do the releasing back-to-front, so as to * avoid O(N^2) behavior in ResourceOwnerForgetBuffer(). */ while (owner->nbuffers > 0) |