pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Korry Douglas <korry.douglas@enterprisedb.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Patch (2): Implement failover on libpq connect level.
Date: Fri, 23 Oct 2015 16:02:33 -0400
Message-ID: <562A9259.4060408@enterprisedb.com> (raw)
In-Reply-To: <20151021090722.GA7825@wagner.pp.ru>
References: <20150818041850.GA5092@wagner.pp.ru>
	<20151014104151.GA6744@wagner.pp.ru>
	<20151021090722.GA7825@wagner.pp.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>




> On 2015.10.14 at 13:41:51 +0300, Victor Wagner wrote:
>
>> Attached patch which implements client library failover and
>> loadbalancing as was described in the proposal
>> <20150818041850.GA5092@wagner.pp.ru>.
>>
> I'm sending imporoved verison of patch. As Olexander Shulgin noted,
> previous version of patch lacks support for service files.
>
> Now support for service files is implemented and multiple host
> statements in the service file are allowed.

A couple of minor nits:

When you call pg_is_in_recovery(), you should schema-qualify the 
function name, just in case some other version of that function exists 
in the search_path.

Also, pg_is_in_recovery() returns a boolean value - PQgetvalue() will 
not return "true" or "false", it will return "t" or "f".

And, you have a bit of garbage in the patch (the patch inserts 
UNIXSOCK_PATH(portstr, portnum, conn->pgunixsocket); in the header 
comment at the top of fe-connect.c).


                         -- Korry


-- 
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 (10+ messages)  latest in thread

Message-ID: <562A9259.4060408@enterprisedb.com>
Permalink:  ../562A9259.4060408@enterprisedb.com/
Also on:    postgresql.org/message-id/562A9259.4060408@enterprisedb.com

 · 

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: korry.douglas@enterprisedb.com, pgsql-hackers@postgresql.org
  Subject: Re: Patch (2): Implement failover on libpq connect level.
  In-Reply-To: <562A9259.4060408@enterprisedb.com>
  References: <20150818041850.GA5092@wagner.pp.ru> <20151014104151.GA6744@wagner.pp.ru> <20151021090722.GA7825@wagner.pp.ru> <562A9259.4060408@enterprisedb.com>

* 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