From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Implement failover on libpq connect level. |
Date: | 2015-12-21 14:18:37 |
Message-ID: | 56780A3D.2090609@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
Sorry, but there is something wrong with your patch:
% patch -p1 -C < ~/Downloads/libpq-failover-5.patch
....
--------------------------
|diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
...
Hunk #18 succeeded at 2804.
patch: **** malformed patch at line 666: <<<<<<< BEGIN MERGE CONFLICT: local
copy shown first <<<<<<<<<<<<<<<
Victor Wagner wrote:
> On Mon, 07 Dec 2015 15:26:33 -0500
> Korry Douglas <korry(dot)douglas(at)enterprisedb(dot)com> wrote:
>
>
>> The problem seems to be in PQconnectPoll() in the case for
>> CONNECTION_AUTH_OK, specifically this code:
>>
>> /* We can release the address list now. */
>> pg_freeaddrinfo_all(conn->addrlist_family, conn->addrlist);
>> conn->addrlist = NULL;
>> conn->addr_cur = NULL;
>> That frees up the list of alternative host addresses. The state
>> machine then progresses to CONNECTION_CHECK_RO (which invokes
>> pg_is_in_recovery()), then CONNECTION_CHECK_RW (waiting for the
>
> Thank you for pointing to this problem. I've overlooked it. Probably
> I should improve my testing scenario.
>
> I', attaching new version of the patch, which, hopefully, handles
> address list freeing correctly.
>
>
>
>
>
>
>
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-12-21 14:36:59 | Re: Experimental evaluation of PostgreSQL's query optimizer |
Previous Message | Ashutosh Bapat | 2015-12-21 13:27:47 | Re: Costing foreign joins in postgres_fdw |
From | Date | Subject | |
---|---|---|---|
Next Message | Victor Wagner | 2015-12-21 14:50:13 | Re: Patch: Implement failover on libpq connect level. |
Previous Message | Markus KARG | 2015-12-21 07:16:19 | Re: Migration to Maven |