Re: IPC::Run::time[r|out] vs our TAP tests

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: IPC::Run::time[r|out] vs our TAP tests
Дата
Msg-id C844DEB3-6566-4AE0-8B0A-D5046C666D18@yesql.se
обсуждение исходный текст
Ответ на [MASSMAIL]IPC::Run::time[r|out] vs our TAP tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: IPC::Run::time[r|out] vs our TAP tests  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
> On 4 Apr 2024, at 23:24, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> A minimum fix that seems to make this work better is as attached,
> but I feel like somebody ought to examine all the IPC::Run::timer
> and IPC::Run::timeout calls and see which ones are mistaken.
> It's a little scary to convert a timeout to a timer because of
> the hazard that someplace that would need to be checking for
> is_expired isn't.

Skimming this and a few callsites it seems reasonable to use a timer instead of
a timeout, but careful study is needed to make sure we're not introducing
anything subtly wrong in the other direction.

> Also, the debug printout code at the bottom of check_completion
> is quite useless, because control can never reach it since
> BackgroundPsql::query_until will "die" on failure.  I think that
> that code worked when written, and I'm suspicious that 664d75753
> broke it, but I've not dug deeply into the history.

AFAICT, in the previous coding the interactive_psql object would use a timer or
timeout based on what the caller provided, and check_completion used a timer so
the debug logging probably worked as written.

--
Daniel Gustafsson




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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Security lessons from liblzma
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: WIP Incremental JSON Parser