pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur @ 2024-01-29 05:30 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2024-01-29 05:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix catalog lookup due to wrong snapshot for subtransactions during decoding. In commit 272248a0c, we fixed the catalog lookup due to the wrong snapshot for transactions and subtransactions during decoding. We failed to consider the case where top-level xact is already marked as containing catalog change but its subtransaction is not yet marked as containing catalog change even though it contained such a change. This can happen when during decoding, none of the WAL records from the subtransaction was decoded and top-level xact contains a DDL. We fix it by marking the transaction and all its subtransactions as containing catalog changes if the top-level xact contains any catalog change and it is present in the initial running xacts array. This fix is required only for 14 and 15 because in prior branches we already always mark the transaction and all its subtransactions as containing catalog changes in the same case. In 16 and above, we preserve the list of transaction IDs and sub-transaction IDs, that have modified catalogs and are running during snapshot serialization, to the serialized snapshot (see commit 7f13ac8123). Author: Fei Changhong Reviewed-by: Amit Kapila, Hayato Kuroda, Andy Fan Discussion: https://postgr.es/m/18280-4c8060178cb41750@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b793a416bfa8448a6be6deeb3b962c1173efa613 Modified Files -------------- .../expected/catalog_change_snapshot.out | 44 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 15 ++++++++ src/backend/replication/logical/snapbuild.c | 10 +++-- 3 files changed, 65 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur @ 2024-01-29 05:30 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2024-01-29 05:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix catalog lookup due to wrong snapshot for subtransactions during decoding. In commit 272248a0c, we fixed the catalog lookup due to the wrong snapshot for transactions and subtransactions during decoding. We failed to consider the case where top-level xact is already marked as containing catalog change but its subtransaction is not yet marked as containing catalog change even though it contained such a change. This can happen when during decoding, none of the WAL records from the subtransaction was decoded and top-level xact contains a DDL. We fix it by marking the transaction and all its subtransactions as containing catalog changes if the top-level xact contains any catalog change and it is present in the initial running xacts array. This fix is required only for 14 and 15 because in prior branches we already always mark the transaction and all its subtransactions as containing catalog changes in the same case. In 16 and above, we preserve the list of transaction IDs and sub-transaction IDs, that have modified catalogs and are running during snapshot serialization, to the serialized snapshot (see commit 7f13ac8123). Author: Fei Changhong Reviewed-by: Amit Kapila, Hayato Kuroda, Andy Fan Discussion: https://postgr.es/m/18280-4c8060178cb41750@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6b77048e571df0160186e2756c380be8a3eea273 Modified Files -------------- .../expected/catalog_change_snapshot.out | 44 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 15 ++++++++ src/backend/replication/logical/snapbuild.c | 10 +++-- 3 files changed, 65 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-01-29 05:30 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-01-29 05:30 pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur Amit Kapila <akapila@postgresql.org> 2024-01-29 05:30 pgsql: Fix catalog lookup due to wrong snapshot for subtransactions dur Amit Kapila <akapila@postgresql.org>
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