Re: BUG #18641: Logical decoding of two-phase commit fails with TOASTed default values
От | Amit Kapila |
---|---|
Тема | Re: BUG #18641: Logical decoding of two-phase commit fails with TOASTed default values |
Дата | |
Msg-id | CAA4eK1K5X2AmaMbWnjT-L=r9BE-qN+B+A8ebZqRqWku-+BYUjg@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #18641: Logical decoding of two-phase commit fails with TOASTed default values (PG Bug reporting form <noreply@postgresql.org>) |
Список | pgsql-bugs |
On Mon, Sep 30, 2024 at 6:46 AM Takeshi Ideriha <iderihatakeshi@gmail.com> wrote: > > Thank you for reporting the issue. > I was able to reproduce the issue by modifying 022_twophase_cascade.pl > accordingly. > > The scan for toast index is actually done under systable_getnext_ordered, > where HandleConcurrentAbort() is called. So it seems to me that this > scan is actually safe for concurrent abort in logical decoding. > Logic around HandleConcurrentAbort is intorduced > https://github.com/postgres/postgres/commit/7259736a6e5b7c7588fff9578370736a6648acbb. > > Though I may not understand the logic around HandleConcurrentAbort > fully and I am not sure not-setting bsysscan at > systable_beginscan_ordered is intentional, > it seems to me setting and unsetting a bsysscan flag in > systable_beginscan_ordered and systable_endscan_ordered would resolve > the issue. > We forgot to set/unset the flag in functions systable_beginscan_ordered and systable_endscan_ordered. BTW, shouldn't this occur even without prepare transaction? If so, we need to backpatch this till 14. Also, it is better to have a test for this, and let's ensure that the new test doesn't increase the regression time too much if possible. One minor point: + + /* + * If CheckXidAlive is set then set a flag to indicate that system table The indentation in the first comment line seems off. -- With Regards, Amit Kapila.
В списке pgsql-bugs по дате отправления: