Re: [BUG] Incorrect historic snapshot may be serialized to disk during fast-forwarding - Mailing list pgsql-hackers

From ocean_li_996
Subject Re: [BUG] Incorrect historic snapshot may be serialized to disk during fast-forwarding
Date
Msg-id 5a24c4b6.363.19bfe51e2f8.Coremail.ocean_li_996@163.com
Whole thread Raw
In response to Re: [BUG] Incorrect historic snapshot may be serialized to disk during fast-forwarding  ("cca5507" <cca5507@qq.com>)
List pgsql-hackers
Hi Masahiko, ChangAo,

Masahiko Sawada <sawada.mshk@gmail.com> 2025-12-30 01:10:01 wrote:
> It might be more future proof to mark transactions as catalog-changed
> even when fast-forwarding a NEW_CID record, as you proposed, but I'd
> like to confirm the actual problems first.

Yeah, I haven’t identified any actual issue in practice. My observations are
purely based on code-level logic analysis.

cca5507 <cca5507@qq.com> Sat, 17 Jan 2026 23:56:17 +0800 wrote:
> The commit message of 'user_catalog_table' says:

> ```
> Replication solutions built around the logical decoding machinery
> will likely need to set this operation for their configuration
> tables; it might also be needed by extensions which perform table
> access in their output functions.
> ```

> So if there is an extension using the incorrect snapshot to scan user
> catalog tables, it will get the wrong result, right?

I agree with your analysis. The introduction of user_catalog_table is intended to
ensure that the historical MVCC in logical replication can observe the historical
state of this table. Consequently, transactions on this table should be tracked by
the historical snapshot — even while in the fast forward state.

Regards
Haiyang Li

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Optimize IS DISTINCT FROM with non-nullable inputs
Next
From: Xuneng Zhou
Date:
Subject: Add pg_stat_recovery system view