Re: MultiXact pessmization in 9.3 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: MultiXact pessmization in 9.3
Date
Msg-id 20131122150431.GL6041@eldon.alvh.no-ip.org
Whole thread Raw
In response to MultiXact pessmization in 9.3  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: MultiXact pessmization in 9.3  (Andres Freund <andres@2ndquadrant.com>)
List 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 by date:

Previous
From: Euler Taveira
Date:
Subject: Re: commit fest 2013-11 week 1 report
Next
From: Merlin Moncure
Date:
Subject: Re: new unicode table border styles for psql