Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwS3-00018H-Ux for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Apr 2013 14:56:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPwS3-0004Vn-FR for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Apr 2013 14:56:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwS2-0004Vf-Nk; Wed, 10 Apr 2013 14:56:42 +0000 Received: from mail-da0-x235.google.com ([2607:f8b0:400e:c00::235]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwRv-0007X1-UB; Wed, 10 Apr 2013 14:56:42 +0000 Received: by mail-da0-f53.google.com with SMTP id n34so247046dal.26 for ; Wed, 10 Apr 2013 07:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=dCpnJ/O/GG2cy6PwSzd8uBDmR3+XRfACBv1KarV575s=; b=M9qMO6hmepsnCRbcerrG1Tq8VTWnOSgccWqzX4o6r3pKYCRzC+296CG0Fa+1Ll/S+q tyYVwYs2HgiH84IkPi2i/46xN6Lc+N+Hkj4Pv8VfS6TrbatLKGdRX/tfZmp7b32vW9c+ SVo9N2jCwz+r7+lHP/8BForJwfwo+FZpmi5SNyYj/fNxXq/+g3HKM22kfZSgN515JDYS zcGmgqdBU2PFO/bgs04Ogg1MvpcBGCz4JafVCqc8Jyx475JKDD2iWe+7nXvS4qwWR9+K P0Vl9OsqXSzjJbnvAHLxCil2Wp+8FPKcUS4ShMkHEKzzehICVRMCX++8NqD/cgQz7Gil wgHQ== X-Received: by 10.66.120.49 with SMTP id kz17mr4037670pab.133.1365605794332; Wed, 10 Apr 2013 07:56:34 -0700 (PDT) Received: from [10.106.175.190] (pw126253234190.6.panda-world.ne.jp. [126.253.234.190]) by mx.google.com with ESMTPS id zv4sm226342pbb.28.2013.04.10.07.56.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:56:33 -0700 (PDT) References: <6461930E-86E2-431B-B5C0-84217678BA80@gmail.com> <5164f3a8.e604420a.355e.ffff9478SMTPIN_ADDED_BROKEN@mx.google.com> <5165322f.01d3440a.463b.6ffdSMTPIN_ADDED_BROKEN@mx.google.com> <4C6D757D-3193-4E31-B031-79EC946591F8@gmail.com> <20130410135515.GB15043@awork2.anarazel.de> <51657938.9020404@gmail.com> <20130410144402.GD15043@awork2.anarazel.de> Mime-Version: 1.0 (1.0) In-Reply-To: <20130410144402.GD15043@awork2.anarazel.de> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: quoted-printable Message-Id: <5430951E-9B8E-44FC-9F8B-424628CC8B7D@gmail.com> Cc: Kyotaro HORIGUCHI , Amit Kapila , "" , "" X-Mailer: iPhone Mail (10B329) From: Dang Minh Huong Subject: Re: replication_timeout not effective Date: Wed, 10 Apr 2013 23:56:27 +0900 To: Andres Freund X-Pg-Spam-Score: -1.7 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 2013/04/10 23:44=1B$B!"=1B(BAndres Freund =1B$B$N%= a%C%;!<%8=1B(B: > On 2013-04-10 23:37:44 +0900, Dang Minh Huong wrote: >> Thanks all, >>=20 >> (2013/04/10 22:55), Andres Freund wrote: >>> On 2013-04-10 22:38:07 +0900, Kyotaro HORIGUCHI wrote: >>>> Hello, >>>>=20 >>>> On Wed, Apr 10, 2013 at 6:57 PM, Dang Minh Huong = wrote: >>>>> In 9.3, it sounds replication_timeout is replaced by wal_sender_timeo= ut. >>>>> 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, >>>>=20 >>>>> 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... >>=20 >> 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). >=20 > Depending on where its hanging a normal SELECT > pg_terminate_backend(pid); might do it. >=20 Greate! it worked. Thank you very much. > Otherwise you will have to wait for the operating system's tcp timeout. >=20 > Greetings, >=20 > Andres Freund >=20 > --=20 > Andres Freund http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services Regards, Huong DM --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs