Re: foreign key locks
От | Alvaro Herrera |
---|---|
Тема | Re: foreign key locks |
Дата | |
Msg-id | 1345670473-sup-4222@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: foreign key locks (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: foreign key locks
Re: foreign key locks |
Список | pgsql-hackers |
Patch v19 contains some tweaks. Most notably, 1. if an Xid requests a lock A, and then a lock B which is stronger than A, then record only lock B and forget lock A. This is important for performance, because EvalPlanQual obtains ForUpdate locks on the tuples that it chases on an update chain. If EPQ was called by an update or delete, previously a MultiXact was being created. In a stock pgbench run this was causing lots of multis to be created, even when there are no FKs. This was most likely involved in the 9% performance decrease that was previously reported. 2. Save a few TransactionIdIsInProgress calls in MultiXactIdWait. We were calling it to determine how many transactions were still running, but not all callers were interested in that info. XidIsInProgress is not particularly cheap, so it seems good to skip it if possible. I didn't try to measure the difference, however. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: