Re: MultiXact pessmization in 9.3
| От | Alvaro Herrera |
|---|---|
| Тема | Re: MultiXact pessmization in 9.3 |
| Дата | |
| Msg-id | 20131122150431.GL6041@eldon.alvh.no-ip.org обсуждение исходный текст |
| Ответ на | MultiXact pessmization in 9.3 (Andres Freund <andres@2ndquadrant.com>) |
| Ответы |
Re: MultiXact pessmization in 9.3
|
| Список | pgsql-hackers |
Andres Freund wrote: > While looking at the multixact truncation code (mail nearby), I've > noticed that there's a significant difference in the way multixact > members are accessed since fkey locks were introduced: > > <9.3 when heap_lock_tuple finds a XMAX_IS_MULTI tuple it executes > MultiXactIdWait() which in turn uses GetMultiXactIdMembers() to get the > xids to wait for. But it skips the lookup if the mxid we lookup is older > than OldestVisibleMXactId. > > 9.3+ instead always looks up the members because GetMultiXactIdMembers() > is also used in cases where we need to access old xids (to check whether > members have commited in non-key updates). But HeapTupleSatisfiesUpdate(), called at the top of heap_lock_tuple, has already called MultiXactIdIsRunning() (which calls GetMembers) before that's even considered. So the call heap_lock_tuple should have members obtained from the multixact.c cache. Am I misunderstanding which code path you mean? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: