From f94ce3275039fb0a76afdd3e0e24e08cd1c5c671 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Sat, 10 Feb 2024 14:35:29 -0500 Subject: [PATCH] Set lock timeout (#1247) --- flow/connectors/postgres/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flow/connectors/postgres/client.go b/flow/connectors/postgres/client.go index fce83d11b3..333f0516a4 100644 --- a/flow/connectors/postgres/client.go +++ b/flow/connectors/postgres/client.go @@ -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,