|From:||Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>|
|Subject:||Async execution of postgres_fdw.|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Hello, this is the 2nd session of 'intoroducing parallelism using
The two patch attached are as following,
Main patch, which includes all functions.
Renaming the variable conn for readability. No functional
* Outline of this patch
From some consideration after the previous discussion and
comments from others, I judged the original (WIP) patch was
overdone as the first step. So I reduced the patch to minimal
function. The new patch does the following,
- Wrapping PGconn by PgFdwConn in order to handle multiple scans
on one connection.
- The core async logic was added in fetch_more_data().
- Invoking remote commands asynchronously in ExecInitForeignScan.
- Canceling async invocation if any other foreign scans,
modifies, deletes use the same connection.
Cancellation is done by immediately fetching the return of
already-invoked acync command.
* Where this patch will be effective.
With upcoming inheritance-partition feature, this patch enables
stating and running foreign scans asynchronously. It will be more
effective for longer TAT or remote startup times, and larger
number of foreign servers. No negative performance effect on
* Concerns about this patch.
- This breaks the assumption that scan starts at ExecForeignScan,
not ExecInitForeignScan, which might cause some problem.
- error reporting code in do_sql_command is quite ugly..
NTT Open Source Software Center
|Next Message||Samrat Revagade||2014-12-15 09:16:02||Re: pg_rewind in contrib|
|Previous Message||Petr Jelinek||2014-12-15 08:41:36||Re: tracking commit timestamps|