pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Wagner <vitus@wagner.pp.ru>
To: pgsql-hackers@postgresql.org
Subject: Re: Patch: Implement failover on libpq connect level.
Date: Fri, 30 Oct 2015 17:09:47 +0300
Message-ID: <20151030170947.3c069342@fafnir> (raw)
In-Reply-To: <CA+TgmoY8J2Jp1fM4EmtU6=3hHLpHc9+qyOJW3OgCNRN6QTgyDg@mail.gmail.com>
References: <20150818041850.GA5092@wagner.pp.ru>
	<20151014104151.GA6744@wagner.pp.ru>
	<562E8C55.9030409@gmx.net>
	<20151028111839.6e73c68a@fafnir>
	<56327381.5040108@gmx.net>
	<CA+TgmoY8J2Jp1fM4EmtU6=3hHLpHc9+qyOJW3OgCNRN6QTgyDg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Fri, 30 Oct 2015 14:26:45 +0100
Robert Haas <robertmhaas@gmail.com> wrote:

> On Thu, Oct 29, 2015 at 8:29 PM, Peter Eisentraut <peter_e@gmx.net>
> 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



view thread (165+ messages)  latest in thread

Message-ID: <20151030170947.3c069342@fafnir>
Permalink:  ../20151030170947.3c069342@fafnir/
Also on:    postgresql.org/message-id/20151030170947.3c069342@fafnir

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
  Subject: Re: Patch: Implement failover on libpq connect level.
  In-Reply-To: <20151030170947.3c069342@fafnir>
  References: <20150818041850.GA5092@wagner.pp.ru> <20151014104151.GA6744@wagner.pp.ru> <562E8C55.9030409@gmx.net> <20151028111839.6e73c68a@fafnir> <56327381.5040108@gmx.net> <CA+TgmoY8J2Jp1fM4EmtU6=3hHLpHc9+qyOJW3OgCNRN6QTgyDg@mail.gmail.com> <20151030170947.3c069342@fafnir>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox