Skip to content

Commit

Permalink
[validate] run IDENTIFY_SYSTEM on replication conn (#2373)
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Dubé <[email protected]>
  • Loading branch information
heavycrystal and serprex authored Dec 18, 2024
1 parent 1573393 commit 4bb22cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions flow/connectors/postgres/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func (c *PostgresConnector) CheckReplicationConnectivity(ctx context.Context) er
if err != nil {
return fmt.Errorf("failed to create replication connection: %v", err)
}
defer conn.Close(ctx)

if _, err := conn.Exec(ctx, "IDENTIFY_SYSTEM"); err != nil {
return fmt.Errorf("failed to execute IDENTIFY_SYSTEM on replication connection: %w", err)
}

return conn.Close(ctx)
}
Expand Down
2 changes: 1 addition & 1 deletion flow/peerdbenv/dynamicconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var DynamicSettings = [...]*protos.DynamicSetting{
"use with PEERDB_PARALLEL_SYNC_NORMALIZE",
DefaultValue: "0",
ValueType: protos.DynconfValueType_INT,
ApplyMode: protos.DynconfApplyMode_APPLY_MODE_IMMEDIATE,
ApplyMode: protos.DynconfApplyMode_APPLY_MODE_AFTER_RESUME,
TargetForSetting: protos.DynconfTarget_ALL,
},
{
Expand Down

0 comments on commit 4bb22cd

Please sign in to comment.