Skip to content

Commit

Permalink
ignore rel messages for tables that are not part of replication
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Dec 6, 2023
1 parent d0b4f20 commit 7545bbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flow/connectors/postgres/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7545bbc

Please sign in to comment.