postgresql/contrib/test_decoding/specs
Amit Kapila b793a416bf 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
2024-01-29 10:42:41 +05:30
..
catalog_change_snapshot.spec Fix catalog lookup due to wrong snapshot for subtransactions during decoding. 2024-01-29 10:42:41 +05:30
concurrent_ddl_dml.spec Do more cleanup of isolation tests for test_decoding 2019-08-24 12:34:37 +09:00
concurrent_stream.spec Fix 'skip-empty-xacts' option in test_decoding for streaming mode. 2020-11-17 12:14:53 +05:30
delayed_startup.spec Introduce logical decoding. 2014-03-03 16:32:18 -05:00
mxact.spec Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
oldest_xmin.spec Allow non-quoted identifiers as isolation test session/step names. 2021-06-23 18:41:39 -04:00
ondisk_startup.spec Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
slot_creation_error.spec Close race condition in slot_creation_error.spec. 2022-03-18 18:18:00 -07:00
snapshot_transfer.spec Introduce xid8-based functions to replace txid_XXX. 2020-04-07 12:04:32 +12:00
subxact_without_top.spec Stop demanding that top xact must be seen before subxact in decoding. 2020-02-19 08:15:49 +05:30
twophase_snapshot.spec Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30