Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtdaI-00033b-KG for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2013 12:19:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TtdaH-0000dg-LM for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2013 12:19:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtdaH-0000db-34 for pgsql-bugs@postgresql.org; Fri, 11 Jan 2013 12:19:41 +0000 Received: from mail12.ics.ntts.co.jp ([210.232.35.65]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtdaB-0004E8-M5 for pgsql-bugs@postgresql.org; Fri, 11 Jan 2013 12:19:40 +0000 Received: from sadoku34.silk.ntts.co.jp (sadoku34 [10.7.18.34]) by mail12.ics.ntts.co.jp (8.14.4/8.14.4/NTTSOFT) with ESMTP id r0BCJWTh026368 for ; Fri, 11 Jan 2013 21:19:32 +0900 (JST) Received: (from root@localhost) by sadoku34.silk.ntts.co.jp (8.13.8/NTTSOFT) id r0BCJWtN003928 for pgsql-bugs@postgresql.org; Fri, 11 Jan 2013 21:19:32 +0900 (JST) Received: from ccmds32.silk.ntts.co.jp [10.107.0.32] by sadoku34.silk.ntts.co.jp with SMTP id XAA03927; Fri, 11 Jan 2013 21:19:32 +0900 Received: from mail147.silk.ntts.co.jp (ccmds32.silk.ntts.co.jp [127.0.0.1]) by ccmds32.silk.ntts.co.jp (8.14.3/8.14.3) with ESMTP id r0BCJVQq000379 for ; Fri, 11 Jan 2013 21:19:31 +0900 Received: from mail147.silk.ntts.co.jp (localhost.localdomain [127.0.0.1]) by mail147.silk.ntts.co.jp (8.14.5/8.14.5/NTTSOFT) with ESMTP id r0BCJPTn011854 for ; Fri, 11 Jan 2013 21:19:25 +0900 Received: from ccmds32 (mail145.silk.ntts.co.jp [10.107.0.145]) by mail147.silk.ntts.co.jp (8.14.5/8.14.5/NTTSOFT) with SMTP id r0BCJP0n011851 for ; Fri, 11 Jan 2013 21:19:25 +0900 Message-ID: <50F00301.1060301@po.ntts.co.jp> Date: Fri, 11 Jan 2013 21:18:09 +0900 From: Tomonari Katsumata User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #7803: Replication Problem(no master is there) References: <50EFCFF5.4040109@vmware.com> In-Reply-To: <50EFCFF5.4040109@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: CC-Mail-V4.3-Client X-CC-Mail-RelayStamp: CC-Mail-V4.3-Server X-Pg-Spam-Score: -1.9 (-) 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 Hi, >> hi, I'm playing with Synchronous Replication on PostgreSQL 9.2.2. >> And I saw a strange behavior. > > Unless you left out something, the configuration you described > actually sets up asynchronous replication. > Thank you for the comment. I was thinking to promote one of them and set synchronous_standby_names = 'sby' and reload configure file. Before that, I noticed the issue. >> ================================================================= >> [issues] >> two standbys are connected on each other, but >> no master is there. >> ... >> ================================================================= >> >> I did not see the situation like above on PostgreSQL 9.1.7. >> >> Is this intended change? > > In 9.1, this scenario was impossible because you could not connect a > standby to another standby. In 9.2, that's allowed. It's a new feature > called "cascading replication", see > http://www.postgresql.org/docs/9.2/static/warm-standby.html#CASCADING-REPLICATION. > > With that feature, it's indeed possible to form a cycle of standby > servers connected to each other. There was just a long discussion on > pgsql-hackers on whether we should try to detect that scenario [1], > but the consensus seems to be that we should not. It would be > difficult to implement such detection, and sometimes it's useful to > have such a cycle, as a transient state at a failover, for example. Sorry, I had not read the discussion and have reported it again. And I understand it's hard to detect cyclic situation. > > So the bottom line is that this is an intended change, and the admin > will just have to avoid doing that. OK. This situation was made by playing, so it's not big problem for now. > > This makes me wonder if there should be a GUC to forbid cascading > replication, though. If you don't want to do cascading replication > (which is quite rare, I'd say), you could just disable it to avoid a > situation like this. I'm not sure but what about adding the parameter("cascade_mode") on recovery.conf ? The parameter represents a will to connect to standby server when starting as standby. If the parameter is set to on, connect to a server forcely like PostgreSQL 9.2, and if the parameter is set to off, connect to the another standby server is refused like PostgreSQL 9.1. > > [1] http://archives.postgresql.org/pgsql-hackers/2012-12/msg01134.php > > - Heikki > > regards, -------- NTT Software Corporation Tomonari Katsumata -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs