Re: Patch: Implement failover on libpq connect level.
От | Mithun Cy |
---|---|
Тема | Re: Patch: Implement failover on libpq connect level. |
Дата | |
Msg-id | CAD__Ougyczuuk4+V486uFwsOSCXWnfjgv5S5=GdumROqdU6Pfg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch: Implement failover on libpq connect level. (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Patch: Implement failover on libpq connect level.
|
Список | pgsql-hackers |
On Mon, Dec 5, 2016 at 11:23 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>I think that you need a restoreErrorMessage call here:
> /* Skip any remaining addresses for this host. */
> conn->addr_cur = NULL;
> if (conn->whichhost + 1 < conn->nconnhost)
> {
> conn->status = CONNECTION_NEEDED
> restoreErrorMessage(conn, &savedMessage);
> goto keep_going;
> }
Right after seeing transaction is read-only we have restored the saved message so I think we do not need one more restore there.
if (strncmp(val, "on", 2) == 0)
{
PQclear(res);
+ restoreErrorMessage(conn, &savedMessage);
В списке pgsql-hackers по дате отправления: