Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZS4dq-0000YS-8l for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 14:47:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZS4dp-00023s-QO for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 14:47:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZS4cW-0007r0-1u for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 14:45:40 +0000 Received: from wagner.pp.ru ([178.63.209.18] helo=mx.wagner.pp.ru) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZS4cS-0001WG-Vk for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 14:45:38 +0000 Received: from mail.wagner.pp.ru (unknown [192.168.217.131]) by mx.wagner.pp.ru (Postfix) with ESMTP id 1D25114B4471 for ; Wed, 19 Aug 2015 17:45:31 +0300 (MSK) Received: from wagner.pp.ru (wifi [192.168.217.63]) by mail.wagner.pp.ru (Postfix) with ESMTPSA id 09737211F1 for ; Wed, 19 Aug 2015 17:45:28 +0300 (MSK) Date: Wed, 19 Aug 2015 17:45:26 +0300 From: ''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN* To: "pgsql-hackers@postgresql.org" Subject: Re: Proposal: Implement failover on libpq connect level. Message-ID: <20150819144526.GA3623@wagner.pp.ru> Mail-Followup-To: "pgsql-hackers@postgresql.org" References: <20150818041850.GA5092@wagner.pp.ru> <20150819065146.GA31302@wagner.pp.ru> <20150819074417.GE31302@wagner.pp.ru> <30615.1439991692@sss.pgh.pa.us> <20150819134634.GA10770@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.5 (--) 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 2015.08.19 at 15:35:17 +0100, Simon Riggs wrote: > > I think we do need some way of saying that a readonly connection is OK. So I had such thing in my propsal (boolean parameter readonly). But haven't yet checked if it is compatible with jdbc syntax. > the default would be to connect to each in turn until we find the master. > It should keep retrying for a period of time since for a short period it is > possible there is no master. If you specify readonly, then a connection to It is very important addition - to specify that if no host is able to establish read-write session, we should retry and give a chance for sever administration to promote one of standbys to master. Probably there should be additional timeout parameter (we have connection_timeout, and this would be failover_timeout) with some reasonaable default. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers