From fdbb8dec176e30c544f0c05633c789328a407023 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Mon, 30 Oct 2023 12:33:13 -0400 Subject: [PATCH] Keep the slot moving --- flow/connectors/postgres/cdc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flow/connectors/postgres/cdc.go b/flow/connectors/postgres/cdc.go index b087e9d0f3..992c387df8 100644 --- a/flow/connectors/postgres/cdc.go +++ b/flow/connectors/postgres/cdc.go @@ -361,6 +361,12 @@ func (p *PostgresCDCSource) consumeStream( clientXLogPos = xld.WALStart records.LastCheckPointID = int64(clientXLogPos) } + + if len(localRecords) == 0 { + // given that we have no records it is safe to update the flush wal position + // to the clientXLogPos. clientXLogPos can be moved forward due to PKM messages. + consumedXLogPos = clientXLogPos + } } } }