Sorry for delayed response, I'll have enough time from now and address this.
At Fri, 23 Sep 2016 21:09:03 -0400, Robert Haas <robertmh...@gmail.com> wrote in <ca+tgmoaxqet4tz03ftqhnzedemzbck+lrni0uwhvvgotna6...@mail.gmail.com> > Well, I promised to post this, so here it is. It's not really working > all that well at this point, and it's definitely not doing anything > that interesting, but you can see the outline of what I have in mind. > Since Kyotaro Horiguchi found that my previous design had a > system-wide performance impact due to the ExecProcNode changes, I > decided to take a different approach here: I created an async > infrastructure where both the requestor and the requestee have to be > specifically modified to support parallelism, and then modified Append > and ForeignScan to cooperate using the new interface. Hopefully that > means that anything other than those two nodes will suffer no > performance impact. Of course, it might have other problems.... > > Some notes: > > - EvalPlanQual rechecks are broken. > - EXPLAIN ANALYZE instrumentation is broken. > - ExecReScanAppend is broken, because the async stuff needs some way > of canceling an async request and I didn't invent anything like that > yet. > - The postgres_fdw changes pretend to be async but aren't actually. > It's just a demo of (part of) the interface at this point. > - The postgres_fdw changes also report all pg-fdw paths as > async-capable, but actually the direct-modify ones aren't, so the > regression tests fail. > - Errors in the executor can leak the WaitEventSet. Probably we need > to modify ResourceOwners to be able to own WaitEventSets. > - There are probably other bugs, too. > > Whee! > > Note that I've tried to solve the re-entrancy problems by (1) putting > all of the event loop's state inside the EState rather than in local > variables and (2) having the function that is called to report arrival > of a result be thoroughly different than the function that is used to > return a tuple to a synchronous caller. > > Comments welcome, if you're feeling brave enough to look at anything > this half-baked. -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers