Re: EINTR in ftruncate()

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: EINTR in ftruncate()
Date: 2022-07-04 11:07:50
Message-ID: 20220704110750.li6iiwivv4smgmbx@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2022-Jul-01, Andres Freund wrote:

> On 2022-07-01 19:55:16 +0200, Alvaro Herrera wrote:
> > On 2022-Jul-01, Andres Freund wrote:

> > > What is the reason for the || ProcDiePending || QueryCancelPending bit? What
> > > if there's dsm operations intentionally done while QueryCancelPending?
> >
> > That mirrors the test for the other block in that function, which was
> > added by 63efab4ca139, whose commit message explains:

> That whole approach seems quite wrong to me. At the absolute very least the
> code needs to check if interrupts are being processed in the current context
> before just giving up due to ProcDiePending || QueryCancelPending.

For the time being, I can just push the addition of the EINTR retry
without testing ProcDiePending || QueryCancelPending.

Álvaro Herrera Breisgau, Deutschland —
"El sudor es la mejor cura para un pensamiento enfermo" (Bardia)

Attachment Content-Type Size
v3-0001-retry-ftruncate.patch text/x-diff 1.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Przemysław Sztoch 2022-07-04 11:08:33 Re: generate_series for timestamptz and time zone problem
Previous Message Przemysław Sztoch 2022-07-04 11:00:03 Re: generate_series for timestamptz and time zone problem