Re: BUG #17948: libpq seems to misbehave in a pipelining corner case

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #17948: libpq seems to misbehave in a pipelining corner case
Дата
Msg-id 202312041847.iur3zphjejur@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #17948: libpq seems to misbehave in a pipelining corner case  (Ivan Trofimov <i.trofimow@yandex.ru>)
Список pgsql-bugs
On 2023-Dec-02, Ivan Trofimov wrote:

> Thank you for looking into this, much appreciated.
> 
> Yes, I can confirm that the patch fixes both the busy-loop and
> client<->server desynchronization problem for me.

Great, thanks for the confirmation.

Mulling it over while writing better comments for it, I realized that it
could still be somewhat brittle, and it's also confusing that part of
the logic is in PQgetResult and the rest in pqCommandQueueAdvance; so I
moved it all to the latter, which also lets me document it more clearly
in the comments.  I addressed the brittleness by changing what to test:
instead of just "it's an error, then do nothing if the queue has a
SYNC", we can verify that we actually have a matching SYNC in both
places.  This seems much better.

Patch v2 attached.  I'll be pushing this to 14+ tomorrow, unless
something ugly comes up.

Thanks for reporting this problem!

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18225: chdb's s3 table function crashes postgresql with plpython3
Следующее
От: Richard Guo
Дата:
Сообщение: Re: BUG #18187: Unexpected error: "variable not found in subplan target lists" triggered by JOIN