all-things-risingwave

How to resolve the error 'relation is already member of publication' when using postgres-cdc?

I am trying to create a source with postgres-cdc but encountering the error 'ERROR: QueryError: internal error: source cannot pass validation: INTERNAL: ERROR: relation 'mtx_transaction_header_2023_09' is already member of publication 'pub_header'. How can I resolve this issue?

Vi

Vijay Shankar

Asked on Oct 18, 2023

  1. Check if the table is already included in the publication before creating the source.
  2. Try adding 'publication.create.enable=false' to the 'WITH' clause when creating the source.
  3. Verify the existence of the table in the publication using the query:
SELECT * FROM pg_publication_tables WHERE schemaname = 'public' AND tablename = 'mtx_transaction_header_2023_09' AND pubname = 'pub_header';
  1. Understand the table structure and if it is a virtual or partitioned table.
  2. Consider developing new features for postgres-cdc to support sharding tables or partitioned tables.
Oct 18, 2023Edited by