[HACKERS] [Bug fix] PQsendQuery occurs error when target_session_attrs isset to read-write

Поиск
Список
Период
Сортировка
От Higuchi, Daisuke
Тема [HACKERS] [Bug fix] PQsendQuery occurs error when target_session_attrs isset to read-write
Дата
Msg-id 1803D792815FC24D871C00D17AE95905AC5FAE@g01jpexmbkw24
обсуждение исходный текст
Ответы Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-hackers
Hello,

This this is my first posting to the mailing list.

I am interested in multiple hosts of libpq [1], then I found the bug in this feature. 
When I set "target_session_attrs" to "any" and call PQsendQuery, my application is succeeded.
However, when I set "target_session_attrs" to "read-write" and call PQsendQuery, "another command is already in
progress"is occurred. 
 
I attached the test application to reproduce this problem. 

I think this is because PQgetResult is not called until PQgetResult has returned a null pointer. 
So, I attached the patch for fix this. 

[1] https://www.postgresql.org/message-id/flat/20150818041850.GA5092@wagner.pp.ru#20150818041850.GA5092@wagner.pp.ru

Regards, 
Daisuke Higuchi


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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] multivariate statistics (v19)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Crash on promotion when recovery.conf is renamed