Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsAPk-0003VR-Hq for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Oct 2015 14:12:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZsAPj-0006pO-VX for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Oct 2015 14:12:20 +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 1ZsAOQ-0005M0-O6 for pgsql-hackers@postgresql.org; Fri, 30 Oct 2015 14:10:58 +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 1ZsAOJ-0000Zq-PN for pgsql-hackers@postgresql.org; Fri, 30 Oct 2015 14:10:57 +0000 Received: from mail.wagner.pp.ru (unknown [192.168.217.2]) by mx.wagner.pp.ru (Postfix) with ESMTP id 8492D486160 for ; Fri, 30 Oct 2015 17:10:14 +0300 (MSK) Received: from fafnir (newmail.postgrespro.ru [93.174.131.138]) by mail.wagner.pp.ru (Postfix) with ESMTPSA id AE24220022 for ; Fri, 30 Oct 2015 17:09:48 +0300 (MSK) Date: Fri, 30 Oct 2015 17:09:47 +0300 From: Victor Wagner To: pgsql-hackers@postgresql.org Subject: Re: Patch: Implement failover on libpq connect level. Message-ID: <20151030170947.3c069342@fafnir> In-Reply-To: References: <20150818041850.GA5092@wagner.pp.ru> <20151014104151.GA6744@wagner.pp.ru> <562E8C55.9030409@gmx.net> <20151028111839.6e73c68a@fafnir> <56327381.5040108@gmx.net> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.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 Fri, 30 Oct 2015 14:26:45 +0100 Robert Haas wrote: > On Thu, Oct 29, 2015 at 8:29 PM, Peter Eisentraut > wrote: > > That's true, but doesn't allowing every parameter to be multiply > specified greatly increase the implementation complexity for a pretty > marginal benefit? I think host and IP would hit 98% of the use cases > here. As far as I can tell from the experience of writing this patch, it would greatly increase complexity. If there should be only need to have multiple hosts, I could almost completely incapsulate changes into DNS resolving code (which already allows to handle several addresses). Need to support different port for each host already required change of internal storage, and as a consequence changes in the regression test suite (src/interfaces/libpq/test/regress.out) But both host and port are used in the same place - in the connect system call. If we add possibility to different values per host for some parameter, such as database name, which should be used significantly later, i.e. during sending of first protocol message, size of patch would grow may be twice. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers