Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5304

Postgres connector ignores partitioned tables during snapshot

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • postgresql-connector
    • None
    • False
    • None
    • False

    Description

      Postgres allows tables to be partitioned. However, parent partitioned table is ignored during snapshot. Having following table:

      CREATE TABLE inventory.part (pk SERIAL, aa integer, PRIMARY KEY(pk, aa)) PARTITION BY RANGE (aa);
      CREATE TABLE inventory.part1 PARTITION OF inventory.part FOR VALUES FROM (0) TO (500);
      CREATE TABLE inventory.part2 PARTITION OF inventory.part FOR VALUES FROM (500) TO (1000);
      

      during the snapshot only part1 and part2 tables are snapshotted, parent tabel part is ignored:

      connect_1    | 2022-06-23 13:31:23,912 INFO   Postgres|dbserver1|snapshot  Snapshot step 2 - Determining captured tables   [io.debezium.relational.RelationalSnapshotChangeEventSource]
      connect_1    | 2022-06-23 13:31:23,915 INFO   Postgres|dbserver1|snapshot  Adding table inventory.part2 to the list of capture schema tables   [io.debezium.relational.RelationalSnapshotChangeEventSource]
      connect_1    | 2022-06-23 13:31:23,915 INFO   Postgres|dbserver1|snapshot  Adding table inventory.part1 to the list of capture schema tables   [io.debezium.relational.RelationalSnapshotChangeEventSource]
      connect_1    | 2022-06-23 13:31:23,915 INFO   Postgres|dbserver1|snapshot  Adding table inventory.debezium_signal to the list of capture schema tables   [io.debezium.relational.RelationalSnapshotChangeEventSource]
      connect_1    | 2022-06-23 13:31:23,917 INFO   Postgres|dbserver1|snapshot  Snapshot step 3 - Locking captured tables [inventory.part1, inventory.part2, inventory.debezium_signal]   [io.debezium.relational.RelationalSnapshotChangeEventSource]
      

      Attachments

        Activity

          People

            vjuranek@redhat.com Vojtech Juranek
            vjuranek@redhat.com Vojtech Juranek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: