Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax) - Mailing list pgsql-hackers

From Zhang Mingli
Subject Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
Date
Msg-id 1938d2d0-a902-4eef-8be9-1fae5aeacdd1@Spark
Whole thread Raw
In response to Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
List 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

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
Next
From: "walker"
Date:
Subject: pg_toast.pg_toast_relfilenode not exist due to vacuum full tablename