From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: streaming replication breaks horribly if master crashes |
Date: | 2010-06-17 08:08:05 |
Message-ID: | AANLkTikUXAms7lfKFycPdpINTqUzJlZ0VOV0tdK1Lbwa@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 17, 2010 at 09:20, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Thu, Jun 17, 2010 at 4:02 PM, Rafael Martinez
> <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> wrote:
>> I tested this yesterday and I could not get any reaction from the wal
>> receiver even after using minimal values compared to the default values .
>>
>> The default values in linux for tcp_keepalive_time, tcp_keepalive_intvl
>> and tcp_keepalive_probes are 7200, 75 and 9. I reduced these values to
>> 60, 3, 3 and nothing happened, it continuous with status ESTABLISHED
>> after 60+3*3 seconds.
>>
>> I did not restart the network after I changed these values on the fly
>> via /proc. I wonder if this is the reason the connection didn't die
>> neither with the new keppalive values after the connection was broken. I
>> will check this later today.
>
> Walreceiver uses libpq to communicate with the master. But keepalive is not
> enabled in libpq currently. That is libpq code doesn't call something like
> setsockopt(SOL_SOCKET, SO_KEEPALIVE). So even if you change the kernel options
> for keepalive, it has no effect on walreceiver.
Yeah, there was a patch submitted for this - I think it's on the CF
page for 9.1... I guess if we really need it walreceiver could enable
it - just get the socket with PQsocket().
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2010-06-17 08:11:22 | Re: ANNOUNCE list (was Re: New PGXN Extension site) |
Previous Message | Fujii Masao | 2010-06-17 07:20:40 | Re: streaming replication breaks horribly if master crashes |