Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwFt-0000Iw-Ce for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Apr 2013 14:44:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPwFs-0000Xb-Tk for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Apr 2013 14:44:08 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwFs-0000XT-0r; Wed, 10 Apr 2013 14:44:08 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPwFp-0001l4-1F; Wed, 10 Apr 2013 14:44:07 +0000 Received: from anarazel.de (p5DDC610D.dip.t-dialin.net [93.220.97.13]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0MgDrd-1UBHgE1NfJ-00NaJH; Wed, 10 Apr 2013 16:44:03 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 3FD741C00F7; Wed, 10 Apr 2013 16:44:02 +0200 (CEST) Date: Wed, 10 Apr 2013 16:44:02 +0200 From: Andres Freund To: Dang Minh Huong Cc: Kyotaro HORIGUCHI , Amit Kapila , "" , "" Subject: Re: [BUGS] replication_timeout not effective Message-ID: <20130410144402.GD15043@awork2.anarazel.de> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51657938.9020404@gmail.com> X-Provags-ID: V02:K0:GzjAXfR5RQVOcQroIvgx9SFmGdIjqD+DGXRjGKxUvve sxzjGAm7w47MrIoxmEO8ewYZRr+4NoKhXCnM/kCHjjHel8CK0T l3dhf/uWPUQff+y4I0xT96STU1pIwvmsrv29TTLrh2cCkPb5ed Pigvksz1AcsMavtPftD2R4wM7tkjAEGp7rNC2t4lTyTvnXxMop pD7bc7SIElbAaOxhXPPp7b3dil53w/I2pZIz8poN/AzF0uOXqG XM+eOy/l/8RI49QLMbPMWKzKFKx4fB1ETB1xNnJwFTHPnKtSJI KR3agGIj8X7EDUxY+ix3e8I+Os5RanJ0rul+NCO8reBs5IJvrb 37vMXQ+xva2ciGIq1gMLBWb95YD9iyKIR5hYyVn1T X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2013-04-10 23:37:44 +0900, Dang Minh Huong wrote: > 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 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). Depending on where its hanging a normal SELECT pg_terminate_backend(pid); might do it. Otherwise you will have to wait for the operating system's tcp timeout. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers