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

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: "Schneider, Jeremy" <schnjere(at)amazon(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "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 20:08:11
Message-ID: A38A1714-CC19-4EF6-BBE3-B716B4B16607@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 9/4/19, 9:03 PM, "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com> wrote:
> Both patches prevent mxactLimit from being newer than the oldest
> running multixact. The v1 patch uses the most aggressive setting
> possible: the oldest running multi; the v2 uses the least aggressive
> of the 'safe' and oldest running multi. At first glance it seems like
> the second one is better: it only does something different if we're in
> the dangerous scenario you identified, but otherwise it sticks to the
> safe limit, which generates less IO.

Thanks for taking a look!

Right, the v2 patch will effectively ramp-down the freezemin as your
freeze_max_age gets smaller, while the v1 patch will set the effective
freezemin to zero as soon as your multixact age passes the threshold.
I think what is unclear to me is whether this ramp-down behavior is
the intended functionality or we should be doing something similar to
what we do for regular transaction IDs (i.e. force freezemin to zero
right after it hits the "oldest xmin is far in the past" threshold).
The comment above MultiXactMemberFreezeThreshold() explains things
pretty well, but AFAICT it is more geared towards influencing
autovacuum scheduling. I agree that v2 is safer from the standpoint
that it changes as little as possible, though.

Nathan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2019-09-05 21:11:35 Re: BUG #15977: Inconsistent behavior in chained transactions
Previous Message Andres Freund 2019-09-05 20:04:29 Re: PostgreSQL12 crash bug report

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2019-09-05 20:27:32 PostgreSQL 12 Beta 4
Previous Message Andres Freund 2019-09-05 20:07:20 Re: tableam vs. TOAST