Re: EINTR in ftruncate()

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: EINTR in ftruncate()
Дата
Msg-id 20220706192941.av3nxh4sdozyn5qz@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: EINTR in ftruncate()  (Andres Freund <andres@anarazel.de>)
Ответы Re: EINTR in ftruncate()  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2022-Jul-05, Andres Freund wrote:

> I think we'd be better off disabling at least some signals during
> dsm_impl_posix_resize(). I'm afraid we'll otherwise just find another
> variation of these problems. I haven't checked the source of ftruncate, but
> what Thomas dug up for fallocate makes it pretty clear that our current
> approach of just retrying again and again isn't good enough. It's a bit more
> obvious that it's a problem for fallocate, but I don't think it's worth having
> different solutions for the two.

So what if we move the retry loop one level up?  As in the attached.
Here, if we get EINTR then we retry both syscalls.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"No hay hombre que no aspire a la plenitud, es decir,
la suma de experiencias de que un hombre es capaz"

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Следующее
От: David Rowley
Дата:
Сообщение: Re: tuplesort Generation memory contexts don't play nicely with index builds