Re: [BUGS] BUG #14544: libpq: specifying 'target_session_attrs=read-write'prevents use of PQsendQuery - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: [BUGS] BUG #14544: libpq: specifying 'target_session_attrs=read-write'prevents use of PQsendQuery
Date
Msg-id CAB7nPqT22d_kty+3LMvpem392sTPjjc8Z0dDWVk77E8VjYimgw@mail.gmail.com
Whole thread Raw
In response to [BUGS] BUG #14544: libpq: specifying 'target_session_attrs=read-write'prevents use of PQsendQuery  (jordal@amazon.com)
List pgsql-bugs
On Tue, Feb 14, 2017 at 4:43 AM,  <jordal@amazon.com> wrote:
> Repro steps:
> 1.      Establish a connection with PQconnectdb and ensure you add
> “target_session_attrs=read-write” to the connection string
> 2.      Try to submit a query using PQsendQuery on the returned connection
> object
> 3.      PQsendQuery fails, and the error message gets set to “another command is
> already in progress”
>
> Reference libpq doc that says PQgetResult must be called until it returns
> NULL: https://www.postgresql.org/docs/current/static/libpq-async.html.

That's a known problem, discussed here as well:

https://www.postgresql.org/message-id/flat/1803D792815FC24D871C00D17AE95905AC5FAE@g01jpexmbkw24#1803D792815FC24D871C00D17AE95905AC5FAE@g01jpexmbkw24
And there is a patch.
--
Michael


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: [BUGS] BUG #14231: logical replication wal sender process spinswhen using error traps in function
Next
From: John R Pierce
Date:
Subject: Re: [BUGS] BUG #14541: Getting error while installation