| From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
|---|---|
| To: | Shawn Debnath <sdn(at)amazon(dot)com> |
| Cc: | 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-09 11:03:18 |
| Message-ID: | CA+hUKGKWS7w4pUFjBPnkU964yBoSK-L-zsHQ2J_-8V0cT-UMgw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 7, 2019 at 3:09 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)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 | Content-Type | Size |
|---|---|---|
| 0001-Introduce-timed-waits-for-condition-variables-v6.patch | application/octet-stream | 4.2 KB |
| 0002-Forward-received-condition-variable-signals-on-ca-v6.patch | application/octet-stream | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2019-07-09 11:07:15 | Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions? |
| Previous Message | Dilip Kumar | 2019-07-09 10:28:22 | Re: POC: Cleaning up orphaned files using undo logs |