From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: EINTR in ftruncate() |
Date: | 2022-07-06 19:29:41 |
Message-ID: | 20220706192941.av3nxh4sdozyn5qz@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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"
Attachment | Content-Type | Size |
---|---|---|
v4-0001-rework-retry-loop-for-dsm_impl_op.patch | text/x-diff | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2022-07-06 20:16:38 | Re: tuplesort Generation memory contexts don't play nicely with index builds |
Previous Message | Andres Freund | 2022-07-06 19:20:47 | Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) |