diff --git a/flow/connectors/postgres/validate.go b/flow/connectors/postgres/validate.go index c6a936a9fe..035623cab8 100644 --- a/flow/connectors/postgres/validate.go +++ b/flow/connectors/postgres/validate.go @@ -119,6 +119,8 @@ func (c *PostgresConnector) CheckReplicationConnectivity(ctx context.Context) er return fmt.Errorf("failed to create replication connection: %v", err) } + defer conn.Close(ctx) + var one int queryErr := conn.QueryRow(ctx, "SELECT 1").Scan(&one) if queryErr != nil {