Re: libpq connection status and closed fd

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq connection status and closed fd
Date: 2014-09-22 08:45:51
Message-ID: CAAfz9KPjVLi+i9x=C-YYQ5zakZcJfJRdERQnmVpgXB5_4Fg-dw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-09-22 12:36 GMT+04:00 Marko Tiikkaja <marko(at)joh(dot)to>:

> On 9/22/14 9:45 AM, Dmitriy Igrishin wrote:
>
>> 2014-09-22 11:35 GMT+04:00 Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>:
>>
>> On Mon, Sep 22, 2014 at 8:17 AM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
>>> wrote:
>>>
>>>> Why are you using close() instead of PQfinish()?
>>>>
>>>
>>> Because I'm testing for an error, please read my message and the
>>> original bug report.
>>>
>>> I read it. You are testing for an error, but use libpq in a wrong way in
>> your test case. You must use PQfinish() to close the connection
>> and PQstatus() will works for you.
>>
>
> Perhaps you should go back and re-read it then. The point of the test
> case is not to test connection closure; it's to test behaviour in the
> presence of network errors.

And where the network error emulation in the test case? By closing fd?
I'm sorry if I don't understand something, but really, I don't see any
problem
or incorrect behavior of *libpq*. It's behavior adequate to a test case.

>
>
>
> .marko
>

--
// Dmitriy.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-09-22 08:57:10 Re: libpq connection status and closed fd
Previous Message Marko Tiikkaja 2014-09-22 08:36:26 Re: libpq connection status and closed fd