Re: Introduce timeout capability for ConditionVariableSleep

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Shawn Debnath <sdn(at)amazon(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Introduce timeout capability for ConditionVariableSleep
Date: 2019-07-15 13:11:25
Message-ID: CA+TgmoY1BdB=aZDFDszax_XxDFy8-1t81NwuuyE0VuFaKfFKSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 12, 2019 at 11:03 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I pushed this too. It's a separate commit, because I think there is
> at least a theoretical argument that it should be back-patched. I'm
> not going to do that today though, because I doubt anyone is relying
> on ConditionVariableSignal() working that reliably yet, and it's
> really with timeouts that it becomes a likely problem.

To make it work reliably, you'd need to be sure that a process can't
ERROR or FATAL after getting signaled and before doing whatever the
associated work is (or that if it does, it will first pass on the
signal). Since that seems impossible, I'm not sure I see the point of
trying to do anything at all.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2019-07-15 13:25:32 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message Anastasia Lubennikova 2019-07-15 12:45:43 Re: Support for jsonpath .datetime() method