RE: Parallel Inserts in CREATE TABLE AS - Mailing list pgsql-hackers

From Hou, Zhijie
Subject RE: Parallel Inserts in CREATE TABLE AS
Date
Msg-id 0fd2e6cd829f4ee9be18d0053c09fc7d@G08CNEXMBPEKD05.g08.fujitsu.local
Whole thread Raw
In response to Re: Parallel Inserts in CREATE TABLE AS  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Parallel Inserts in CREATE TABLE AS  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Hi,

I have an issue about the following code:

    econtext = node->ps.ps_ExprContext;
     ResetExprContext(econtext);
 
+    if (ISCTAS(node->ps.intoclause))
+    {
+        ExecParallelInsertInCTAS(node);
+        return NULL;
+    }

    /* If no projection is required, we're done. */
    if (node->ps.ps_ProjInfo == NULL)
        return slot;

    /*
     * Form the result tuple using ExecProject(), and return it.
     */
    econtext->ecxt_outertuple = slot;
    return ExecProject(node->ps.ps_ProjInfo);

It seems the projection will be skipped.
Is this because projection is not required in this case ?
(I'm not very familiar with where the projection will be.)

If projection is not required here, shall we add some comments here?

Best regards,
houzj





pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Multi Inserts in CREATE TABLE AS - revived patch
Next
From: Craig Ringer
Date:
Subject: Re: [PATCH] LWLock self-deadlock detection