From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: MultiXact pessmization in 9.3 |
Date: | 2013-11-22 15:04:31 |
Message-ID: | 20131122150431.GL6041@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2013-11-22 15:05:30 | Re: new unicode table border styles for psql |
Previous Message | Euler Taveira | 2013-11-22 14:54:54 | Re: commit fest 2013-11 week 1 report |