Skip to content

Commit

Permalink
cdc: remove SetLastOffset (#1166)
Browse files Browse the repository at this point in the history
This was being experimented with to help reduce slot size,
however it's conflicting with reducing pool use

To have the two work together some kind of clone-for-new-connection
mechanism needs to be made. But this code isn't used anymore,
so defer implementing that mechanism for now by removing this code
  • Loading branch information
serprex authored Jan 29, 2024
1 parent 275a331 commit ffccce1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions flow/connectors/postgres/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type PostgresCDCSource struct {
SrcTableIDNameMapping map[uint32]string
TableNameMapping map[string]model.NameAndExclude
slot string
SetLastOffset func(int64) error
publication string
relationMessageMapping model.RelationMessageMapping
typeMap *pgtype.Map
Expand Down Expand Up @@ -62,7 +61,6 @@ type PostgresCDCConfig struct {
RelationMessageMapping model.RelationMessageMapping
CatalogPool *pgxpool.Pool
FlowJobName string
SetLastOffset func(int64) error
}

type startReplicationOpts struct {
Expand All @@ -88,7 +86,6 @@ func NewPostgresCDCSource(cdcConfig *PostgresCDCConfig, customTypeMap map[uint32
SrcTableIDNameMapping: cdcConfig.SrcTableIDNameMapping,
TableNameMapping: cdcConfig.TableNameMapping,
slot: cdcConfig.Slot,
SetLastOffset: cdcConfig.SetLastOffset,
publication: cdcConfig.Publication,
relationMessageMapping: cdcConfig.RelationMessageMapping,
typeMap: pgtype.NewMap(),
Expand Down
1 change: 0 additions & 1 deletion flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ func (c *PostgresConnector) PullRecords(catalogPool *pgxpool.Pool, req *model.Pu
RelationMessageMapping: req.RelationMessageMapping,
CatalogPool: catalogPool,
FlowJobName: req.FlowJobName,
SetLastOffset: req.SetLastOffset,
}, c.customTypesMapping)
if err != nil {
return fmt.Errorf("failed to create cdc source: %w", err)
Expand Down

0 comments on commit ffccce1

Please sign in to comment.