Re: libpq heartbeat

From: Marcin Giedz <marcin(dot)giedz(at)arise(dot)pl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Francisco Olarte <folarte(at)peoplecall(dot)com>, depesz <depesz(at)depesz(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: libpq heartbeat
Date: 2016-10-27 18:07:29
Message-ID: 2102021191.545376.1477591649371.JavaMail.zimbra@arise.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you all for your feedback. I've checked both server and client side and :

a) libpq by default enables keepalive
b) in postgresql.conf tcp_keepalives_idle=0 (default setting) means - apply system default

Is there any chance that it's NOT fired on RHEL7 acting as SQL server for some reasons? I'll be able to check this next morning.

Regards
Marcin

Od: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Do: "Francisco Olarte" <folarte(at)peoplecall(dot)com>
DW: "depesz" <depesz(at)depesz(dot)com>, "Marcin Giedz" <marcin(dot)giedz(at)arise(dot)pl>, pgsql-general(at)postgresql(dot)org
Wysłane: czwartek, 27 październik 2016 18:32:54
Temat: Re: [GENERAL] libpq heartbeat

Francisco Olarte <folarte(at)peoplecall(dot)com> writes:
> On Thu, Oct 27, 2016 at 5:01 PM, hubert depesz lubaczewski
> <depesz(at)depesz(dot)com> wrote:
>> On Thu, Oct 27, 2016 at 04:43:55PM +0200, Marcin Giedz wrote:
>>> I'm wondering if there is any natural implementation of heartbeats in
>>> libpq library?

>> check tcp_keepalives_* in postgresql.conf

> Isn't this a server setting, and so going to affect every connection,

Yes, but there are equivalent libpq parameters for firing heartbeat
pings from the client side. Those are per-connection.

https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2016-10-27 18:24:52 Re: libpq heartbeat
Previous Message Francisco Olarte 2016-10-27 17:45:45 Re: libpq heartbeat