On Fri, Nov 5, 2010 at 4:00 PM, Shigeru HANADA <han...@metrosystems.co.jp> wrote: >> > * am_beginscan() -> first call of FdwRoutine.Iterate()? >> It might be good to have a separated "beginscan" method if we use >> asynchronous scans in multiple foreign servers in one query > > You mean that separated beginscan (FdwRoutine.BeginScan?) starts > asynchronous query and returns immediately, and FdwRoutine.Iterate > returns result of that query?
Yes. Each BeginScan() in the executor node tree will be called at the beginning of executor's run. The callback should not block the caller. OTOH, Iterate() are called at the first time tuples in the node are required. PL/Proxy has a similar functionality with RUN ON ALL to start queries in parallel. So, I think it's a infrastructure commonly required. -- Itagaki Takahiro -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers