pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dang Minh Huong <kakalot49@gmail.com>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Kyotaro HORIGUCHI <kyota.horiguchi@gmail.com>
Cc: Amit Kapila <amit.kapila@huawei.com>
Cc: <pgsql-hackers@postgresql.org> <pgsql-hackers@postgresql.org>
Cc: <pgsql-bugs@postgresql.org> <pgsql-bugs@postgresql.org>
Subject: Re: replication_timeout not effective
Date: Wed, 10 Apr 2013 23:37:44 +0900
Message-ID: <51657938.9020404@gmail.com> (raw)
In-Reply-To: <20130410135515.GB15043@awork2.anarazel.de>
References: <6461930E-86E2-431B-B5C0-84217678BA80@gmail.com>
	<5164f3a8.e604420a.355e.ffff9478SMTPIN_ADDED_BROKEN@mx.google.com>
	<CD28A167-93D7-409C-8541-9249C320E6B2@gmail.com>
	<5165322f.01d3440a.463b.6ffdSMTPIN_ADDED_BROKEN@mx.google.com>
	<4C6D757D-3193-4E31-B031-79EC946591F8@gmail.com>
	<CAM103DuLWwRPXXfpn-6HzXnGOfOuA04gQoRt8EW28m8bpy8Crg@mail.gmail.com>
	<20130410135515.GB15043@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Thanks all,

(2013/04/10 22:55), Andres Freund wrote:
> On 2013-04-10 22:38:07 +0900, Kyotaro HORIGUCHI wrote:
>> Hello,
>>
>> On Wed, Apr 10, 2013 at 6:57 PM, Dang Minh Huong <kakalot49@gmail.com> wrote:
>>> In 9.3, it sounds replication_timeout is replaced by wal_sender_timeout.
>>> So if it is solved in 9.3 i think there is a way to terminate it.
>>> I hope it is fixed in 9.1 soon
>> Hmm. He said that,
>>
>>> But in my environment the sender process is hang up (in several tens of minunites) if i turn off  (by power off) Standby PC while *pg_basebackup* is excuting.
>> Does basebackup run only on 'replication connection' ?
>> As far as I saw base backup uses 'base backup' connection in addition
>> to 'streaming' connection. The former seems not under the control of
>> wal_sender_timeout or replication_timeout and easily blocked at
>> send(2) after sudden cut out of the network connection underneath.
>> Although the latter indeed is terminated by them.
> Yes, it's run via a walsender connection. The only "problem" is that it
> doesn't check for those timeouts. I am not sure it would be a good thing
> to do so to be honest. At least not using the same timeout as actual WAL
> sending, thats just has different characteristics.
> On the other hand, hanging around that long isn't nice either...
I tried max_wal_sender with 1, so when the walsender is hanging.
I can not run again pg_basebackup (or start the standby DB).
I'm increasing it to 2, so the seconds successfully. But i'm afraid
  that when the third occures the hanging walsender in the first
  is not yet terminated...

  I think not, but is there a way to terminate hanging up but not
  restart PostgreSQL server or kill walsender process?
  (kill walsender process can caused a crash to DB server,
  so i don't want to do it).

  # i've also tried with pg_cancel_backend() but it did not work too.
>> Blocking in send(2) might could occur for async-rep connection but not
>> likely for sync-rep since it does not fill the buffers of libpq and
>> socket easilly.
> You just need larger transactions for it. A COPY or so ought to do it.
>
> Greetings,
>
> Andres Freund
>
Regard,
Huong DM


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <51657938.9020404@gmail.com>
Permalink:  ../51657938.9020404@gmail.com/
Also on:    postgresql.org/message-id/51657938.9020404@gmail.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: kakalot49@gmail.com, andres@2ndquadrant.com, kyota.horiguchi@gmail.com, amit.kapila@huawei.com, pgsql-hackers@postgresql.org
  Subject: Re: replication_timeout not effective
  In-Reply-To: <51657938.9020404@gmail.com>
  References: <6461930E-86E2-431B-B5C0-84217678BA80@gmail.com> <5164f3a8.e604420a.355e.ffff9478SMTPIN_ADDED_BROKEN@mx.google.com> <CD28A167-93D7-409C-8541-9249C320E6B2@gmail.com> <5165322f.01d3440a.463b.6ffdSMTPIN_ADDED_BROKEN@mx.google.com> <4C6D757D-3193-4E31-B031-79EC946591F8@gmail.com> <CAM103DuLWwRPXXfpn-6HzXnGOfOuA04gQoRt8EW28m8bpy8Crg@mail.gmail.com> <20130410135515.GB15043@awork2.anarazel.de> <51657938.9020404@gmail.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