Search Postgresql Archives

Re: dblink: could not send query: another command is already in progress

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

 



Thiemo Kellner wrote:
> The cause of the error message is clear; as the documentation says:
> 
> >    the query will fail soon. You must still complete the normal query protocol,
> >    for example by calling dblink_get_result.
> 
> Ah, maybe this is the underlying problem. If dblink requires that 
> results get retrieved by dblink_get_result before the dblink is actually 
> ready to receive another query, it would explain the error I get. 
> However, I feel than the result of dblink_is_busy is faulty, 
> counter-intuitive or just useless in that context. Or I just 
> misinterpreted documentation: "checks if connection is busy with an 
> async query"
> 
> My understand there is that the actual query is still being processed, 
> the gathering of the results. I did not count the keeping of the result 
> as part of the query.

That is a misunderstanding.

If the connection is "busy", that means that the asynchronous query
is still busy receiving a result from the server.

Once it is no longer busy, a result has arrived and is ready to be
consumed.

You have to consume the result before you can send the next query.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux