Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
От | Zhang Mingli |
---|---|
Тема | Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax) |
Дата | |
Msg-id | 1938d2d0-a902-4eef-8be9-1fae5aeacdd1@Spark обсуждение исходный текст |
Ответ на | Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax) (Justin Pryzby <pryzby@telsasoft.com>) |
Ответы |
Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)
|
Список | 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?
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 по дате отправления: