DanielCarter-stack commented on issue #10593:
URL: https://github.com/apache/seatunnel/issues/10593#issuecomment-4045097767

   <!-- code-pr-reviewer -->
   Thanks for reporting this. Based on the source code analysis, the 
Postgres-CDC connector does not currently support PostgreSQL partitioned tables.
   
   **Root cause:**
   - Table discovery (`TableDiscoveryUtils.listTables()`) filters by 
`TABLE_TYPE = 'BASE TABLE'`, which excludes partitioned tables (`PARTITIONED 
TABLE`)
   - Row count estimation (`queryApproximateRowCnt()`) queries with `relkind = 
'r'`, unable to recognize partitioned parent tables (`relkind = 'p'`)
   
   **Workaround:**
   Sync partition child tables directly. Individual partitions created by 
pg_partman (e.g., `lazada_order_details_p2024_01`) are `BASE TABLE` type and 
should be discoverable. Update your `table-names` config to target the specific 
partition child tables.
   
   **To confirm the diagnosis, please run and share:**
   
   ```sql
   SELECT table_name, table_type 
   FROM information_schema.tables 
   WHERE table_schema = 'original' AND table_name = 'lazada_order_details';
   ```
   
   Also check if partition child tables exist:
   
   ```sql
   SELECT tablename FROM pg_tables 
   WHERE schemaname = 'original' AND tablename LIKE 'lazada_order_details%';
   ```
   
   Community contributions are welcome to add partitioned table support.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to