pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <amit.kapila@huawei.com>
To: 'Robert Haas' <robertmhaas@gmail.com>
Cc: 'Heikki Linnakangas' <hlinnakangas@vmware.com>
Cc: 'Fujii Masao' <masao.fujii@gmail.com>
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] BUG #7534: walreceiver takes long time to detect n/w breakdown
Date: Tue, 9 Oct 2012 18:34:31 +0530
Message-ID: <00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com> (raw)
In-Reply-To: <CA+TgmoYo8m-uK6Qti29Fs2C=56XbJw6n35OZUQOUePfKKP9sCg@mail.gmail.com>
References: <E1TBlX1-0003OA-SB@wrigleys.postgresql.org>
	<CAHGQGwE+vpwh6JteEggpgk5Pq45w+-os5T9OQ5vGUhbO9L8iQw@mail.gmail.com>
	<50515fcd.c32f320a.4297.ffffb186SMTPIN_ADDED@mx.google.com>
	<CAHGQGwFhcg0BwOTNzWwk8cABOCKGwFdV9e=szJK+33PDFS8yUg@mail.gmail.com>
	<6C0B27F7206C9E4CA54AE035729E9C382853264E@szxeml509-mbs>
	<CAHGQGwGG=UxNOJX0V966CftRm4C_54XDfaR2TRzWXysFFQcJSw@mail.gmail.com>
	<6C0B27F7206C9E4CA54AE035729E9C382853288B@szxeml509-mbs>
	<CAHGQGwGWMOc-hKTyjjswzYLykAsA2+t+xpcybi6c+DkN+5dA+A@mail.gmail.com>
	<5056cb6b.29f2440a.7bd9.1633SMTPIN_ADDED@mx.google.com>
	<CAHGQGwG2cWJ+Fr+AroXEA3=26Yrc_C4yMW6HJ8rhX9nKm7Z0NA@mail.gmail.com>
	<6C0B27F7206C9E4CA54AE035729E9C38285337FF@szxeml509-mbs>
	<506972B9.6060104@vmware.com>
	<6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs>
	<506AA530.30106@vmware.com>
	<6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs>
	<CA+TgmoYQotjpMU2J6L9ODVnC6-AmqsHd2mUnNW332CpV77sZxg@mail.gmail.com>
	<5072e70c.aad9d80a.5316.ffffc61fSMTPIN_ADDED@mx.google.com>
	<CA+TgmoYo8m-uK6Qti29Fs	2C=56XbJw6n35OZUQOUePfKKP9sCg@mail.gmail.com>

On Tuesday, October 09, 2012 6:00 PM Robert Haas wrote:
> On Mon, Oct 8, 2012 at 10:42 AM, Amit Kapila <amit.kapila@huawei.com>
> wrote:
> > How about following:
> > 1. replication_client_timeout -- shouldn't it be client as new
> configuration
> > is for wal receiver
> > 2. replication_standby_timeout
> 
> ISTM that the client and the standby are the same thing.

Yeah same, but may be one (replication_standby_timeout) can be more easily
understandable by user.

 
> > If we introduce a new parameter for wal receiver, wouldn't
> > replication_timeout be confusing for user?
> 
> Maybe.  

> I actually don't think that I understand what problem we're
> trying to solve here.  If the connection between the master and the
> standby is lost, shouldn't the standby realize that it's no longer
> receiving keepalives from the master and terminate the connection? 

For wal receiver keepalives are also like one kind of message, so the
behavior is such that when it checks
that it doesn't receive any message, it tries to send reply/feedback message
to master after an interval of 
wal_receiver_status_interval.
So after every wal_receiver_status_interval, wal receiver sends a reply, but
still the socket send doesn't
fail. It fails only after many send calls as internally might be in send(),
until the sockets internal buffer is full, it keeps accumulating even if
other side recv has not received the data.
So that's the reason we decided to introduce a timeout parameter in wal
receiver similar to what we have currently in walsender.

> I
> thought I had tested this at some point and it was working, so either
> it's subsequently gotten broken again or the scenario you're talking
> about is different in some way that I don't currently understand.

Standby takes quite longer around 15 minutes to detect whereas master is
able to
detect quite sooner in 2-3 mins and master also mainly detects due to
timeout functionality in wal sender.

With Regards,
Amit Kapila.





view thread (55+ messages)  latest in thread

Message-ID: <00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com>
Permalink:  ../00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com/
Also on:    postgresql.org/message-id/00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: amit.kapila@huawei.com, robertmhaas@gmail.com, hlinnakangas@vmware.com, masao.fujii@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] BUG #7534: walreceiver takes long time to detect n/w breakdown
  In-Reply-To: <00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com>
  References: <E1TBlX1-0003OA-SB@wrigleys.postgresql.org> <50515fcd.c32f320a.4297.ffffb186SMTPIN_ADDED@mx.google.com> <CAHGQGwFhcg0BwOTNzWwk8cABOCKGwFdV9e=szJK+33PDFS8yUg@mail.gmail.com> <6C0B27F7206C9E4CA54AE035729E9C382853264E@szxeml509-mbs> <CAHGQGwGG=UxNOJX0V966CftRm4C_54XDfaR2TRzWXysFFQcJSw@mail.gmail.com> <6C0B27F7206C9E4CA54AE035729E9C382853288B@szxeml509-mbs> <CAHGQGwGWMOc-hKTyjjswzYLykAsA2+t+xpcybi6c+DkN+5dA+A@mail.gmail.com> <5056cb6b.29f2440a.7bd9.1633SMTPIN_ADDED@mx.google.com> <CAHGQGwG2cWJ+Fr+AroXEA3=26Yrc_C4yMW6HJ8rhX9nKm7Z0NA@mail.gmail.com> <6C0B27F7206C9E4CA54AE035729E9C38285337FF@szxeml509-mbs> <506972B9.6060104@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs> <506AA530.30106@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs> <CA+TgmoYQotjpMU2J6L9ODVnC6-AmqsHd2mUnNW332CpV77sZxg@mail.gmail.com> <5072e70c.aad9d80a.5316.ffffc61fSMTPIN_ADDED@mx.google.com> <00ae01cda61e$9fe90290$dfbb07b0$@kapila@huawei.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox