From 7545bbcc486347d023d2b427eb9a78a59ce4561a Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Wed, 6 Dec 2023 17:08:04 -0500 Subject: [PATCH] ignore rel messages for tables that are not part of replication --- flow/connectors/postgres/cdc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flow/connectors/postgres/cdc.go b/flow/connectors/postgres/cdc.go index 278f0ed863..3386680565 100644 --- a/flow/connectors/postgres/cdc.go +++ b/flow/connectors/postgres/cdc.go @@ -399,6 +399,10 @@ func (p *PostgresCDCSource) processMessage(batch *model.CDCRecordStream, xld pgl // treat all relation messages as correponding to parent if partitioned. msg.RelationID = p.getParentRelIdIfPartitioned(msg.RelationID) + if _, exists := p.SrcTableIDNameMapping[msg.RelationID]; !exists { + return nil, nil + } + // TODO (kaushik): consider persistent state for a mirror job // to be stored somewhere in temporal state. We might need to persist // the state of the relation message somewhere