From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: EINTR in ftruncate() |
Date: | 2022-07-06 21:05:27 |
Message-ID: | CA+hUKGJj=+GVjtLaeT7sD1gnS6tn=4Lb5+iACf4RT7wBuguLZg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 7, 2022 at 9:03 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2022-07-07 08:56:33 +1200, Thomas Munro wrote:
> > On Thu, Jul 7, 2022 at 8:39 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > So I think we need: 1) block most signals, 2) a retry loop *without*
> > > interrupt checks.
> >
> > Yeah. I was also wondering about wrapping the whole function in
> > PG_SETMASK(&BlockSig), PG_SETMASK(&UnBlockSig), but also leaving the
> > while (rc == EINTR) loop there (without the check for *Pending
> > variables), only because otherwise when you attach a debugger and
> > continue you'll get a spurious EINTR and it'll interfere with program
> > execution. All blockable signals would be blocked *except* SIGQUIT,
> > which means that fast shutdown/crash will still work. It seems nice
> > to leave that way to interrupt it without resorting to SIGKILL.
>
> Fast shutdown shouldn't use SIGQUIT - did you mean immediate? I think
> it's fine to allow immediate shutdowns, but I don't think we should
> allow fast shutdowns to interrupt it.
Err, yeah, that one.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2022-07-06 21:13:27 | Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~ |
Previous Message | Andres Freund | 2022-07-06 21:03:23 | Re: EINTR in ftruncate() |