RE: RE: Re:BUG #18369: logical decoding core on AssertTXNLsnOrder() - Mailing list pgsql-bugs

From Hayato Kuroda (Fujitsu)
Subject RE: RE: Re:BUG #18369: logical decoding core on AssertTXNLsnOrder()
Date
Msg-id TYCPR01MB1207790E98F0A563280CC39FCF5262@TYCPR01MB12077.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: RE: Re:BUG #18369: logical decoding core on AssertTXNLsnOrder()  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-bugs
Dear Amit, 

OK, so let's consider the approach. Note that at this stage, another failure [1]
was ignored.

Here are patches for all supported versions. The failure on PG12-PG15 has been
fixed on my env, but you can confirm as well.

The approach is almost same as what initially shared by Haiyang [2]. However,
instead of extending ReorderBufferXidSetCatalogChanges(), a new function
ReorderBufferXidSetCatalogChangesEx() was added.

Note again that there were changes also in ReorderBufferAssignChild() and
ReorderBufferCleanupTXN(). Extended ReorderBufferXidSetCatalogChanges would the
create ReorderBufferTXN not as top, however, these transaction would not be
associated with the top one. So there is a possibility that txn->node is invalid.
IIUC, only ReorderBufferAssignChild() calls ReorderBufferTXNByXid with create = true
and create_as_top = false, and they would be immediately associated in below.

```
    /* add to subtransaction list */
    dlist_push_tail(&txn->subtxns, &subtxn->node);
    txn->nsubtxns++;
```

[1]:
https://www.postgresql.org/message-id/TYCPR01MB12077573479C5A2471BDE8065F5232%40TYCPR01MB12077.jpnprd01.prod.outlook.com
[2]: https://www.postgresql.org/message-id/6d0e80d6.c1fc.18deeb8120a.Coremail.ocean_li_996%40163.com

Best Regards,
Hayato Kuroda
FUJITSU LIMITED
https://www.fujitsu.com/ 


Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18384: It's not bug just question about documentation
Next
From: PG Bug reporting form
Date:
Subject: BUG #18385: Assert("strategy_delta >= 0") in BgBufferSync() fails due to race condition