"Tsunakawa, Takayuki" <tsunakawa.ta...@jp.fujitsu.com> writes: > The attached patch speeds up transaction completion when any prior > transaction accessed many relations in the same session.
Hm. Putting a list header for a purely-local data structure into shared memory seems quite ugly. Isn't there a better place to keep that? Do we really want a dlist here at all? I'm concerned that bloating LOCALLOCK will cost us when there are many locks involved. This patch increases the size of LOCALLOCK by 25% if I counted right, which does not seem like a negligible penalty. My own thought about how to improve this situation was just to destroy and recreate LockMethodLocalHash at transaction end (or start) if its size exceeded $some-value. Leaving it permanently bloated seems like possibly a bad idea, even if we get rid of all the hash_seq_searches on it. regards, tom lane