Re: BUG #18280: logical decoding build wrong snapshot for subtransactions - Mailing list pgsql-bugs

From Andy Fan
Subject Re: BUG #18280: logical decoding build wrong snapshot for subtransactions
Date
Msg-id 878r4vmho2.fsf@163.com
Whole thread Raw
In response to Re:BUG #18280: logical decoding build wrong snapshot for subtransactions  ("feichanghong" <feichanghong@qq.com>)
List pgsql-bugs
Hi,

Thanks for the steps for reproducing this bug and the fix!

"feichanghong" <feichanghong@qq.com> writes:

>> SnapBuildXidSetCatalogChanges (introduced in 272248a) skipping the check for
>> the sub-transactions when the parent transaction has been marked as
>> containing catalog changes should be the root cause of the problem.
>
> My fix is to remove the ReorderBufferXidHasCatalogChanges condition from the SnapBuildXidSetCatalogChanges function.
This
> approach has a false positive; the subtransactions that didn't change catalog to the snapshot are also added to the
> commit list. But that won't be a problem since we use snapshot built during decoding only to read system catalogs,
as
> 272248a's commit message says.

The patch looks good to me.

Added Masahiko who is the author of commit 272248a and Amit who is alway
good at this area as well. Hope this can get more attention from them.

-- 
Best Regards
Andy Fan




pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18285: pgdg.list doesn't work
Next
From: Richard Guo
Date:
Subject: Re: BUG #18284: Filter in left lateral join not respected