pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Fan <zhihuifan1213@163.com>
To: feichanghong <feichanghong@qq.com>
Cc: pgsql-bugs@lists.postgresql.org,Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Subject: Re: BUG #18280: logical decoding build wrong snapshot for subtransactions
Date: Fri, 12 Jan 2024 10:00:41 +0800
Message-ID: <878r4vmho2.fsf@163.com> (raw)
In-Reply-To: <tencent_0726471CA7087C4AC6EF1F19409DF11FCF08@qq.com>
References: <18280-4c8060178cb41750@postgresql.org>
	<tencent_0726471CA7087C4AC6EF1F19409DF11FCF08@qq.com>


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






view thread (11+ messages)  latest in thread

Message-ID: <878r4vmho2.fsf@163.com>
Permalink:  ../878r4vmho2.fsf@163.com/
Also on:    postgresql.org/message-id/878r4vmho2.fsf@163.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: zhihuifan1213@163.com, feichanghong@qq.com, sawada.mshk@gmail.com, amit.kapila16@gmail.com
  Subject: Re: BUG #18280: logical decoding build wrong snapshot for subtransactions
  In-Reply-To: <878r4vmho2.fsf@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox