From 1fa4d82a7b31c1f6adfdf736f3b0b4ff79376bf6 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Thu, 7 Dec 2023 16:41:22 +0530 Subject: [PATCH] ignore relationmessage processing for tables not being synced --- 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 b35045b945..fc0063c1ab 100644 --- a/flow/connectors/postgres/cdc.go +++ b/flow/connectors/postgres/cdc.go @@ -498,6 +498,10 @@ func (p *PostgresCDCSource) processMessage(batch *model.CDCRecordStream, xld pgl // treat all relation messages as corresponding 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