Skip to content

Commit

Permalink
ignore wal heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Dec 17, 2023
1 parent 7d152c9 commit e5a01b3
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,17 +863,18 @@ func (c *PostgresConnector) SyncFlowCleanup(jobName string) error {
}

func (c *PostgresConnector) SendWALHeartbeat() error {
command := `
BEGIN;
DROP aggregate IF EXISTS PEERDB_EPHEMERAL_HEARTBEAT(float4);
CREATE AGGREGATE PEERDB_EPHEMERAL_HEARTBEAT(float4) (SFUNC = float4pl, STYPE = float4);
DROP aggregate PEERDB_EPHEMERAL_HEARTBEAT(float4);
END;
`
_, err := c.pool.Exec(c.ctx, command)
if err != nil {
return fmt.Errorf("error bumping wal position: %w", err)
}

// command := `
// BEGIN;
// DROP aggregate IF EXISTS PEERDB_EPHEMERAL_HEARTBEAT(float4);
// CREATE AGGREGATE PEERDB_EPHEMERAL_HEARTBEAT(float4) (SFUNC = float4pl, STYPE = float4);
// DROP aggregate PEERDB_EPHEMERAL_HEARTBEAT(float4);
// END;
// `
// _, err := c.pool.Exec(c.ctx, command)
// if err != nil {
// return fmt.Errorf("error bumping wal position: %w", err)
// }

log.Info("ignoring wal heartbeat")
return nil
}

0 comments on commit e5a01b3

Please sign in to comment.