[Postgres-xl-developers] tablesample case of regression test

Tomas Vondra tomas.vondra at 2ndquadrant.com
Wed Aug 9 07:35:11 PDT 2017


Hi senhu,

On 08/09/2017 10:39 AM, senhu(胡森) wrote:
> Hi, all:
> 
> In tablesample case of regression test, we execute the cursor which 
> is scan on table and sample, but get the error” unrecognized node 
> type: 106” in ExecReScan, seems that we don’t have ReScanRemoteQuery.
> I add function ExecReScanRemoteQuery, almost same as
> ExecReScanRemoteSubplan.
 >

Yes, this seems like a simple and straightforward way to fix the issue.

Any ideas why we did not have ExecReScanRemoteQuery before? Are there 
any issues with it, or did we just not need it until TABLESAMPLE got 
introduced?

I do recall we add Materialize node on top of Remote Subquery in some 
cases, to eliminate the overhead of executing it repeatedly (and 
transferring the data over network). Would that be useful here?

 >
> Or we can change the plan, get the data from datanodes, then do the
> sample. >

I doubt that's a very attractive option, as we'd end up reading and 
transferring much more data (not just the sampled blocks/rows, but 
everything), only to throw most of it away. Which eliminates the main 
TABLESAMPLE benefits.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


More information about the Postgres-xl-developers mailing list