Skip to content

Commit

Permalink
Set lock timeout (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Feb 10, 2024
1 parent e56b7cc commit f94ce32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flow/connectors/postgres/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ func (c *PostgresConnector) createSlotAndPublication(
return fmt.Errorf("[slot] error setting idle_in_transaction_session_timeout: %w", err)
}

_, err = conn.Exec(ctx, "SET lock_timeout = 0")
if err != nil {
return fmt.Errorf("[slot] error setting lock_timeout: %w", err)
}

opts := pglogrepl.CreateReplicationSlotOptions{
Temporary: false,
Mode: pglogrepl.LogicalReplication,
Expand Down

0 comments on commit f94ce32

Please sign in to comment.