Hi, 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). I've seen several profiles - independent from this investigation - where GetMultiXactIdMembers() is high up in the profiles. So this seems to be a significant pessimization. I think we need to re-introduce that optimization for the - hopefully very common - case of LOCK_ONLY multixacts. The file header's comment about OldestVisibleMXactId[] seems to be out-of-date btw, since it's now perfectly normal to access mxids that are older than what MultiXactIdSetOldestVisible() computed. Maybe I am just missing something? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers