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