Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
Date: 2022-09-10 04:07:30
Message-ID: 1938d2d0-a902-4eef-8be9-1fae5aeacdd1@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

That’s interesting, dig into it for a while but not too much progress.

Maybe we could add some logs to print MultiXactMembers’ xid and status if xid is 0.

Inside MultiXactIdGetUpdateXid()

```
nmembers = GetMultiXactIdMembers(xmax, &members, false, false);

if (nmembers > 0)
{
 int i;

 for (i = 0; i < nmembers; i++)
 {
 /* Ignore lockers */
 if (!ISUPDATE_from_mxstatus(members[i].status))
 continue;

 /* there can be at most one updater */
 Assert(update_xact == InvalidTransactionId);
 update_xact = members[i].xid;

// log here if xid is invalid
#ifndef USE_ASSERT_CHECKING

 /*
 * in an assert-enabled build, walk the whole array to ensure
 * there's no other updater.
 */
 break;
#endif
 }

 pfree(members);
}
// and here if didn’t update update_xact at all (it shouldn’t happen as designed)
return update_xact;
```
That will help a little if we can reproduce it.

And could we see multixact reply in logs if db does recover?

Regards,
Zhang Mingli

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message walker 2022-09-10 04:53:30 pg_toast.pg_toast_relfilenode not exist due to vacuum full tablename
Previous Message Justin Pryzby 2022-09-10 02:57:56 Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)