Re: Nonblocking libpq + openssl = ?

From: Nikolai Zhubr <n-a-zhubr(at)yandex(dot)ru>
To: undisclosed-recipients:;
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Nonblocking libpq + openssl = ?
Date: 2016-09-17 13:14:37
Message-ID: 57DD41BD.6020805@yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

17.09.2016 3:27, Andres Freund:
[...]
> The relevant user-level API of libpq (PQisBusy) doesn't have a way to
> return "waiting for write". So we'd have to break API compatibility.

I think this is actually not entirely correct.
PQisBusy is fine, I do not see a need to touch it at all.
Rather, the return value of PQConsumeInput could be extended (in fact
has just been extended by me here) as follows:

Old spec:
0 == error
1 == no error

New spec:
0 == error
1 == no error
2 == no error but can't proceed until pending write finished.

Agreed, this is still an incompatible API change, but not excessively
destructive and it should be fairly easy to make adjustments for such
change (unless the usage has already been hopelessly broken).

Thank you,
Regards,
Nikolai

>
> Greetings,
>
> Andres Freund
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-09-17 14:25:57 Re: question on error during COPY FROM
Previous Message Deven Phillips 2016-09-17 12:51:56 Re: Verifying LISTEN subscriptions?