Re: Introduce timeout capability for ConditionVariableSleep - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Introduce timeout capability for ConditionVariableSleep
Date
Msg-id CA+hUKGKWS7w4pUFjBPnkU964yBoSK-L-zsHQ2J_-8V0cT-UMgw@mail.gmail.com
Whole thread Raw
In response to Re: Introduce timeout capability for ConditionVariableSleep  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Introduce timeout capability for ConditionVariableSleep
List pgsql-hackers
On Sun, Jul 7, 2019 at 3:09 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> +               /* Timed out */
> +               if (rc == 0)
> +                       return true;

Here's a version without that bit, because I don't think we need it.

> That still leaves the danger that the CV can be signalled some time
> after ConditionVariableTimedSleep() returns.  So now I'm wondering if
> ConditionVariableCancelSleep() should signal the CV if it discovers
> that this process is not in the proclist, on the basis that that must
> indicate that we've been signalled even though we're not interested in
> the message anymore, and yet some other process else might be
> interested, and that might have been the only signal that is ever
> going to be delivered by ConditionVariableSignal().

And a separate patch to do that.  Thoughts?


--
Thomas Munro
https://enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs
Next
From: Daniel Gustafsson
Date:
Subject: Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?