postgresql/src/backend/utils
Heikki Linnakangas eeb6f37d89 Add a small cache of locks owned by a resource owner in ResourceOwner.
This speeds up reassigning locks to the parent owner, when the transaction
holds a lot of locks, but only a few of them belong to the current resource
owner. This is particularly helps pg_dump when dumping a large number of
objects.

The cache can hold up to 15 locks in each resource owner. After that, the
cache is marked as overflowed, and we fall back to the old method of
scanning the whole local lock table. The tradeoff here is that the cache has
to be scanned whenever a lock is released, so if the cache is too large,
lock release becomes more expensive. 15 seems enough to cover pg_dump, and
doesn't have much impact on lock release.

Jeff Janes, reviewed by Amit Kapila and Heikki Linnakangas.
2012-06-21 15:30:26 +03:00
..
adt Remove incomplete/incorrect support for zero-column foreign keys. 2012-06-20 20:15:02 -04:00
cache Increase MAX_SYSCACHE_CALLBACKS from 20 to 32. 2012-06-20 19:47:37 -04:00
error Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
fmgr Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
hash Move CRC tables to libpgport, and provide them in a separate include file. 2012-02-28 19:53:39 -05:00
init Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
mb Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
misc Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
mmgr Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
resowner Add a small cache of locks owned by a resource owner in ResourceOwner. 2012-06-21 15:30:26 +03:00
sort Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
time Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
Gen_dummy_probes.sed Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Gen_fmgrtab.pl Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
errcodes.txt Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
generate-errcodes.pl Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
probes.d Make group commit more effective. 2012-01-30 16:53:48 +02:00