pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix assertion failures while processing NEW_CID record in logica 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/16b1fe0037dc5a23dc7e2eb2ab62949800797b91 Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/64ff0fe4e8c47fc390bb645d48ba38675494a2b4 Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a592ed923e67871749233dcd7106a64936a971cf Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/25f7be1ca2362b317f4ad7d60de5be9e82d4f722 Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1bf4d92060eeefa40b4d63d246a490379a5cec78 Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5f7076cb609ee9e7b928d038555423955104fa64 Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix assertion failures while processing NEW_CID record in logica @ 2022-10-20 04:23 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Amit Kapila @ 2022-10-20 04:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix assertion failures while processing NEW_CID record in logical decoding. When the logical decoding restarts from NEW_CID, since there is no association between the top transaction and its subtransaction, both are created as top transactions and have the same LSN. This caused the assertion failure in AssertTXNLsnOrder(). This patch skips the assertion check until we reach the LSN at which we start decoding the contents of the transaction, specifically start_decoding_at LSN in SnapBuild. This is okay because we don't guarantee to make the association between top transaction and subtransaction until we try to decode the actual contents of transaction. The ordering of the records prior to the start_decoding_at LSN should have been checked before the restart. The other assertion failure is due to the reason that we forgot to track that we have considered top-level transaction id in the list of catalog changing transactions that were committed when one of its subtransactions is marked as containing catalog change. Reported-by: Tomas Vondra, Osumi Takamichi Author: Masahiko Sawada, Kuroda Hayato Reviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko Sawada Backpatch-through: 10 Discussion: https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.com Discussion: https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/10ed7b9e4b1946e88ae7f71c2c3cc1c570ea214e Modified Files -------------- .../expected/catalog_change_snapshot.out | 45 ++++++++++++++++++++++ .../specs/catalog_change_snapshot.spec | 16 ++++++++ src/backend/replication/logical/reorderbuffer.c | 14 +++++++ src/backend/replication/logical/snapbuild.c | 3 ++ 4 files changed, 78 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2022-10-20 04:23 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica Amit Kapila <akapila@postgresql.org> 2022-10-20 04:23 pgsql: Fix assertion failures while processing NEW_CID record in logica 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