postgresql/src/backend
Tom Lane f60d176a5e Tweak catalog cache management algorithms to reduce cost of
SearchCatCacheList and ReleaseCatCacheList.  Previously, we incremented
and decremented the refcounts of list member tuples along with the list
itself, but that's unnecessary, and very expensive when the list is big.
It's cheaper to change only the list refcount.  When we are considering
deleting a cache entry, we have to check not only its own refcount but
its parent list's ... but it's easy to arrange the code so that this
check is not made in any commonly-used paths, so the cost is really nil.
The bigger gain though is to refrain from DLMoveToFront'ing each individual
member tuple each time the list is referenced.  To keep some semblance
of fair space management, lists are just marked as used or not since the
last cache cleanout search, and we do a MoveToFront pass only when about
to run a cleanout.  In combination, these changes reduce the costs of
SearchCatCacheList and ReleaseCatCacheList from about 4.5% of pgbench
runtime to under 1%, according to my gprof results.
2005-08-13 22:18:07 +00:00
..
access Change a couple of "can't happen" error messages to be a shade more 2005-08-12 14:34:14 +00:00
bootstrap Cause ShutdownPostgres to do a normal transaction abort during backend 2005-08-08 03:12:16 +00:00
catalog Make pg_stat_file() use OUT parameters so that the user doesn't have to 2005-08-13 19:02:34 +00:00
commands Solve the problem of OID collisions by probing for duplicate OIDs 2005-08-12 01:36:05 +00:00
executor Add NOWAIT option to SELECT FOR UPDATE/SHARE. 2005-08-01 20:31:16 +00:00
lib Replace the use of "0" with "NULL" where appropriate in dllist.c, for 2005-01-18 22:59:32 +00:00
libpq Autovacuum loose end mop-up. Provide autovacuum-specific vacuum cost 2005-08-11 21:11:50 +00:00
main Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
nodes Add NOWAIT option to SELECT FOR UPDATE/SHARE. 2005-08-01 20:31:16 +00:00
optimizer Prevent planner from including temp tables of other backends when expanding 2005-08-02 20:27:45 +00:00
parser Add NOWAIT option to SELECT FOR UPDATE/SHARE. 2005-08-01 20:31:16 +00:00
po Translation updates 2005-01-17 20:27:44 +00:00
port [ backpatched to 8.0.X.] 2005-08-12 21:23:10 +00:00
postmaster Reverse out changes to canonicalize_path(), per suggestion from Tom. 2005-08-12 19:43:32 +00:00
regex I made the patch that implements regexp_replace again. 2005-07-10 04:54:33 +00:00
rewrite Add NOWAIT option to SELECT FOR UPDATE/SHARE. 2005-08-01 20:31:16 +00:00
storage Reverse out Assert addition. 2005-08-12 23:13:54 +00:00
tcop Autovacuum loose end mop-up. Provide autovacuum-specific vacuum cost 2005-08-11 21:11:50 +00:00
utils Tweak catalog cache management algorithms to reduce cost of 2005-08-13 22:18:07 +00:00
Makefile Put libpgport into OBJS instead of LIBS, so that it gets included 2005-07-28 04:31:30 +00:00
nls.mk New translation 2005-01-09 17:10:29 +00:00