Search Postgresql Archives

Re: libpq: Which functions may hang due to network issues?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Frey <d.frey@xxxxxx> writes:
>> On 3. Dec 2021, at 17:00, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
>> On Fri, 2021-12-03 at 11:37 +0100, Daniel Frey wrote:
>>> Is there a complete list of methods that might wait for network communication?

>> No; you have to read the code.

> I feel that this is insufficient, as the code might change. And it might be simple enought for something like PQstatus(), but not all functions are that simple.

> If this property of a function is not guaranteed by the documentation, how am I expected to write a library that doesn't depend on a specific version of libpq? Could these guarantees be added to the documentation, please?

No.  For one thing, we'd probably forget to maintain any such info.
In any case, I think you'd be best off to assume that anything that
isn't purely local state inspection might try to contact the server.
And it's not hard to see which ones are local state inspection.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux