Re: BUG #5465: dblink TCP connection hangs blocking translation from being terminated

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5465: dblink TCP connection hangs blocking translation from being terminated
Дата
Msg-id 3110.1394804722@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5465: dblink TCP connection hangs blocking translation from being terminated  (Robert Voinea <rvoinea@gmail.com>)
Ответы Re: BUG #5465: dblink TCP connection hangs blocking translation from being terminated  (Robert Voinea <rvoinea@gmail.com>)
Список pgsql-bugs
Robert Voinea <rvoinea@gmail.com> writes:
> In our setup, we make use extensively of dblink.
> Due to the fact that some queries take some time to complete and that the link
> is over the internet, sometime the server process (the transaction that runs
> the dblink queries) hangs when the link goes down, keeping locks on several
> records plus some advisory locks and thus freezing the whole (most of) the
> database.

> What I have found is this bug, that is remarkably similar (if not identical)
> with what we are experiencing.
>
http://postgresql.1045698.n5.nabble.com/BUG-5465-dblink-TCP-connection-hangs-blocking-translation-from-being-terminated-td2132419.html#a2132420

That does not sound like a Postgres bug to me.  What you are unhappy about
is that the kernel isn't timing out a lost TCP connection more quickly.
The default timeout is long (>1 hour probably), but that's required by
Internet standards.  The appropriate fix for this is to use aggressive
keepalive parameters on the connection.  You can set libpq's keepalive
parameters in the connection string given to dblink.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Voinea
Дата:
Сообщение: BUG #5465: dblink TCP connection hangs blocking translation from being terminated
Следующее
От: "digoal@126.com"
Дата:
Сообщение: Re: BUG #9552: IndexOnlyScan startup_cost>0, why not equal 0?it's a bug?