Re: Patch to improve performance of replay of AccessExclusiveLock
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-03-07T17:04:12Z
Lists: pgsql-hackers
Hi, On 2017-03-08 00:15:05 +1300, David Rowley wrote: > -static List *RecoveryLockList; > +/* > + * RecoveryLockTable is a poor man's hash table that allows us to partition > + * the stored locks. Which partition a lock is stored in is determined by the > + * xid which the lock belongs to. The hash function is very simplistic and > + * merely performs a binary AND against the final 0-based partition number. > + * Splitting into partitions in this way avoids having to look through all > + * locks to find one specific to a given xid. > + */ > +static List **RecoveryLockTable; Why are we open coding this? That strikes me as a bad plan... Regards, Andres
Commits
-
Move RecoveryLockList into a hash table.
- a40cff8956e8 11.0 landed
- 35750a38b7ab 9.6.10 landed
- c4ccbcc1a2a1 9.4.19 landed
- 12f7d91994d1 9.3.24 landed
- 7bcda60d41cb 9.5.14 landed
- 88554c091101 10.5 landed