Re: dblink locked query - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: dblink locked query
Date
Msg-id 52EF20B2E3209443BC37736D00C3C1380B8EF484@EXADV1.host.magwien.gv.at
Whole thread Raw
In response to dblink locked query  ("Francois Rigaudie" <francois.rigaudie@tdf.fr>)
List pgsql-hackers
Tom Lane answered to a question from Francois Rigaudie:
>> Since there is no timeout possibility with dblink I look for a
solution to
>> that problem.
>
> Doesn't statement_timeout work?

To expand on this:
dblink will login as a certain user on the remote database.
If your design is good, this is a dedicated user only for this
purpose.

You can then
ALTER ROLE <user> SET statement_timeout = 10000
for that user on the remote database to have all statements
canceled when they take longer than 10 seconds.

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Vacuum columns in statistics tables
Next
From: "Francois Rigaudie"
Date:
Subject: Rép. : Re: dblink locked query