Re: Patch: Implement failover on libpq connect level.

From: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
To: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: Implement failover on libpq connect level.
Date: 2016-09-08 14:48:25
Message-ID: 20160908144825.GC1182@e733
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

> 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
> ```

Oops. Sorry, my mistake. I forgot to check for untracked files.
Everything is fine.

--
Best regards,
Aleksander Alekseev

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2016-09-08 14:51:33 Re: Logical Replication WIP
Previous Message Aleksander Alekseev 2016-09-08 14:44:05 Re: Patch: Implement failover on libpq connect level.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mithun Cy 2016-09-09 05:50:59 Re: Patch: Implement failover on libpq connect level.
Previous Message Aleksander Alekseev 2016-09-08 14:44:05 Re: Patch: Implement failover on libpq connect level.