From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: condition variables |
Date: | 2016-09-14 02:55:44 |
Message-ID: | CAM3SWZTLOfWUGKxbd1xh1UVVMBVaFLExEOSGZOHBfiBrSiWODw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 11, 2016 at 2:47 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Another approach to the problem is to use a latch wait loop. That
> almost works. Interrupts can be serviced, and you can recheck shared
> memory to see whether the condition for proceeding is satisfied after
> each iteration of the loop. There's only one problem: when you do
> something that might cause the condition to be satisfied for other
> waiting backends, you need to set their latch - but you don't have an
> easy way to know exactly which processes are waiting, so how do you
> call SetLatch? I originally thought of adding a function like
> SetAllLatches(ParallelContext *) and maybe that can work, but then I
> had what I think is a better idea, which is to introduce a notion of
> condition variables.
I don't see a CF entry for this. Are you planning to work on this
again soon, Robert?
I have an eye on this patch due to my work on parallel CREATE INDEX.
It would be nice to have some rough idea of when you intend to commit
this.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Pavan Deolasee | 2016-09-14 03:17:25 | Re: Vacuum: allow usage of more than 1GB of work mem |
Previous Message | Amit Langote | 2016-09-14 02:48:55 | Comment typo in execIndexing.c |