Skip to content

Commit

Permalink
remove SendWALHeartbeat from the CDCPullConnector interface
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Dec 22, 2023
1 parent 08861aa commit 04a26ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions flow/connectors/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ type CDCPullConnector interface {
// PullFlowCleanup drops both the Postgres publication and replication slot, as a part of DROP MIRROR
PullFlowCleanup(jobName string) error

// SendWALHeartbeat allows for activity to progress restart_lsn on postgres.
SendWALHeartbeat() error

// GetSlotInfo returns the WAL (or equivalent) info of a slot for the connector.
GetSlotInfo(slotName string) ([]*protos.SlotInfo, error)

Expand Down
16 changes: 0 additions & 16 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -880,22 +880,6 @@ func (c *PostgresConnector) SyncFlowCleanup(jobName string) error {
return nil
}

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)
}

return nil
}

// GetLastOffset returns the last synced offset for a job.
func (c *PostgresConnector) GetOpenConnectionsForUser() (*protos.GetOpenConnectionsForUserResult, error) {
row := c.pool.
Expand Down

0 comments on commit 04a26ec

Please sign in to comment.