pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aleksander Alekseev <a.alekseev@postgrespro.ru>
To: Victor Wagner <vitus@wagner.pp.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Patch: Implement failover on libpq connect level.
Date: Thu, 8 Sep 2016 17:44:05 +0300
Message-ID: <20160908144405.GB1182@e733> (raw)
In-Reply-To: <20160908142420.0609f202@fafnir.local.vm>
References: <CAD__OugniD9nz6weXCvnEELKX2iTK3xCmVWttVjLH0k5rn_NOA@mail.gmail.com>
	<CAD__Ouh53ttKfZ-439R9OGDOx=1xbBHS34SKOgTLqu73=gcp7Q@mail.gmail.com>
	<20160831111330.53a018ed@fafnir.local.vm>
	<CAD__OuimXSFUNCXXfcXXGEceuH8ik+Hr9qSYU0BidZw4gSxdig@mail.gmail.com>
	<CAD__Oui-3m6W83HyQNQLczrGRDQr4R67jv76DGwf1tT764zQ5A@mail.gmail.com>
	<CAD__OuhfOL-TQz-BBrFMj_tu8DqTc+ccxbwLkj+tUHAzvH14Pw@mail.gmail.com>
	<20160905072215.4efd7b8a@wagner.wagner.home>
	<20160905110311.GA11351@e733>
	<CAD__OujS2tU9nkTAeVnfJ-vMe8+JT3Po+puSopu8WF_Cyx4sOA@mail.gmail.com>
	<20160908142420.0609f202@fafnir.local.vm>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hello, Victor.

> I'm sending new version of patch.
> 
> I've replaced readonly option with target_server_type (with JDBC
> compatibility alias targetServerType), 
> 
> use logic of setting defaults based on number of hosts in the connect
> string instead of complicated condition in the state machine,
> 
> added checks for return values of memory allocation function.
> 
> Also, I've solved pg_usleep problem by linking pgsleep.c into libpq
> along with some other libpgport objects which are already linked there.
> 
> Thus client applications don't need to link with libpgport and libpq
> shared library is self-containted.

This patch doesn't apply to master branch:

```
$ git apply ~/temp/libpq-failover-8.patch
/home/eax/temp/libpq-failover-8.patch:184: trailing whitespace.
check: 
/home/eax/temp/libpq-failover-8.patch:252: trailing whitespace.
	/* 
/home/eax/temp/libpq-failover-8.patch:253: trailing whitespace.
	 *  Validate target_server_mode option 
/home/eax/temp/libpq-failover-8.patch:254: trailing whitespace.
	 */ 
/home/eax/temp/libpq-failover-8.patch:306: trailing whitespace.
			appendPQExpBuffer(&conn->errorMessage, 
error: src/interfaces/libpq/t/001-multihost.pl: already exists in
working directory

$ git diff
```

-- 
Best regards,
Aleksander Alekseev


-- 
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: <20160908144405.GB1182@e733>
Permalink:  ../20160908144405.GB1182@e733/
Also on:    postgresql.org/message-id/20160908144405.GB1182@e733

 · 

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: a.alekseev@postgrespro.ru, vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
  Subject: Re: Patch: Implement failover on libpq connect level.
  In-Reply-To: <20160908144405.GB1182@e733>
  References: <CAD__OugniD9nz6weXCvnEELKX2iTK3xCmVWttVjLH0k5rn_NOA@mail.gmail.com> <CAD__Ouh53ttKfZ-439R9OGDOx=1xbBHS34SKOgTLqu73=gcp7Q@mail.gmail.com> <20160831111330.53a018ed@fafnir.local.vm> <CAD__OuimXSFUNCXXfcXXGEceuH8ik+Hr9qSYU0BidZw4gSxdig@mail.gmail.com> <CAD__Oui-3m6W83HyQNQLczrGRDQr4R67jv76DGwf1tT764zQ5A@mail.gmail.com> <CAD__OuhfOL-TQz-BBrFMj_tu8DqTc+ccxbwLkj+tUHAzvH14Pw@mail.gmail.com> <20160905072215.4efd7b8a@wagner.wagner.home> <20160905110311.GA11351@e733> <CAD__OujS2tU9nkTAeVnfJ-vMe8+JT3Po+puSopu8WF_Cyx4sOA@mail.gmail.com> <20160908142420.0609f202@fafnir.local.vm> <20160908144405.GB1182@e733>

* 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