From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Luc Vlaming <luc(at)swarm64(dot)com>, "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parallel Inserts in CREATE TABLE AS |
Date: | 2020-12-07 04:51:01 |
Message-ID: | CALj2ACXumu_sTRcEOKhKYcqg7c0pMcwf7q0Os259LxgLWDU33Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for the comments.
On Mon, Dec 7, 2020 at 8:56 AM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
>
>
> + (void) SetCurrentCommandIdUsedForWorker();
> + myState->output_cid = GetCurrentCommandId(false);
>
> SetCurrentCommandIdUsedForWorker already has void as return type. The '(void)' is not needed.
>
Removed.
>
> + * rd_createSubid is marked invalid, otherwise, the table is
> + * not allowed to extend by the workers.
>
> nit: to extend by the workers -> to be extended by the workers
>
Changed.
>
> For IsParallelInsertInCTASAllowed, logic is inside 'if (IS_CTAS(into))' block.
> You can return false when (!IS_CTAS(into)) - this would save some indentation for the body.
>
Done.
>
> + if (rel && rel->relpersistence != RELPERSISTENCE_TEMP)
> + allowed = true;
>
> Similarly, when the above condition doesn't hold, you can return false directly - reducing the next if condition to 'if (queryDesc)'.
>
Done.
>
> The composite condition is negated. Maybe you can write without negation:
>
Done.
>
> + * Write out the number of tuples this worker has inserted. Leader will use
> + * it to inform to the end client.
>
> 'inform to the end client' -> 'inform the end client' (without to)
>
Changed.
Attaching v8 patch. Consider this for further review.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Parallel-Inserts-in-CREATE-TABLE-AS.patch | application/octet-stream | 49.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2020-12-07 04:56:39 | Re: Improving spin-lock implementation on ARM. |
Previous Message | Bruce Momjian | 2020-12-07 04:46:12 | Re: Proposed patch for key managment |