| От | Fabien COELHO |
|---|---|
| Тема | Re: pgsql: psql: Add test for query canceling |
| Дата | |
| Msg-id | alpine.DEB.2.22.394.2108250705270.2232211@pseudo обсуждение исходный текст |
| Ответ на | Re: pgsql: psql: Add test for query canceling (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: pgsql: psql: Add test for query canceling
Re: pgsql: psql: Add test for query canceling |
| Список | pgsql-committers |
> That looks pretty solid to me, and I can confirm that it passes > on wrasse's host. The only nit I can find to pick is that this: > > + usleep(10_000) until -s "$tempdir/psql.pid" or ($count++ > 180 * 100 and die 'pid file did not appear'); > > basically assumes that psql.pid will be written atomically. > It'd be marginally safer to wait till psql.pid can be seen to > contain a newline. I don't think that would be too hard to do, > if you put the slurp_file call inside the wait loop and inspect > its result. I finally came around to have a look at the patch. For the issue raised above, I can see that the file could be created but not yet written, but as the patch waits for the file to be non zero, ISTM that the probability of a torn write of a single integer by echo is so remote that we could let it as that? Attached a version with the slurping in the loop anyway. -- Fabien.
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера