Re: Suggestion to add --continue-client-on-abort option to pgbench

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Suggestion to add --continue-client-on-abort option to pgbench
Дата
Msg-id CAHGQGwEG4zTBPr+R8+Xi7k8d8GR77xDNGSW0H8fG49E9dZLiaQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Suggestion to add --continue-client-on-abort option to pgbench  (Chao Li <li.evan.chao@gmail.com>)
Список pgsql-hackers
On Fri, Nov 7, 2025 at 9:07 AM Chao Li <li.evan.chao@gmail.com> wrote:
> If you put this explanation to the inline comment, things would get clearer. But based on this explanation, I just
gotthe other doubt. When a pipeline is aborted, res is NULL, but we still stay in the for loop, PQClear(res) will do
nothing,then the “for” loop is similar to an empty loop, would that lead to a high CPU usage? From this perspective,
whenpipeline is aborted, while waiting for PIPELINE_SYNC, adding a tiny sleep might be better. 

You're concerned about cases where the server response is delayed,
causing the pipeline status to take time to reach PIPELINE_SYNC, right?
In that situation, since discardAvailableResults() waits on PQgetResult(),
it shouldn't enter a busy loop, correct?


> I will back to work next Monday, then I will try to run a test and reproduce the scenario of pipeline abort.

I plan to commit the patch soon, but let's keep discussing and
investigating the case you mentioned afterward!

Regards,

--
Fujii Masao



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