Re: ERROR: multixact X from before cutoff Y found to be still running

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Jeremy Schneider <schnjere(at)amazon(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "Nasby, Jim" <nasbyj(at)amazon(dot)com>
Subject: Re: ERROR: multixact X from before cutoff Y found to be still running
Date: 2019-09-05 21:31:52
Message-ID: CA+hUKGJNSprDdAwwBVKQgO9FT9P9MWwFjvvy5g+ONaDJuLDsNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Sep 6, 2019 at 6:32 AM Jeremy Schneider <schnjere(at)amazon(dot)com> wrote:
> It really appears that it was the autovacuum process itself that was providing the oldest running multixact which caused errors on yesterday's attempts to vacuum other tables - even though I though vacuum processes were ignored by that code. I'll have to take another look at some point.

Ah, that seems plausible. If the backend ever called
GetMultiXactIdMembers() and thence MultiXactIdSetOldestVisible() at a
time when there were live multixacts, it would set its own
OldestVisibleMXactID[] slot, and then GetOldestMultiXactId() would
return that value for the rest of the transaction (unless there was an
even older one to return, but in the case you're describing there
wasn't). GetOldestMultiXactId() doesn't have a way to ignore vacuum
backends, like GetOldestXmin() does. That doesn't seem to be a
problem in itself.

(I am not sure why GetOldestMultiXactId() needs to consider
OldestVisibleMXactId[] at all for this purpose, and not just
OldestMemberXactId[], but I suppose it has to do with simultaneously
key-share-locked and updated tuples or something, it's too early and I
haven't had enough coffee.)

--
Thomas Munro
https://enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2019-09-05 23:20:14 Re: BUG #15383: Join Filter cost estimation problem in 10.5
Previous Message Andres Freund 2019-09-05 21:11:35 Re: BUG #15977: Inconsistent behavior in chained transactions

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-09-05 21:32:01 Re: AtEOXact_Snapshot timing
Previous Message Andres Freund 2019-09-05 21:11:35 Re: BUG #15977: Inconsistent behavior in chained transactions