Re: Parallel Inserts in CREATE TABLE AS

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Luc Vlaming <luc(at)swarm64(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Inserts in CREATE TABLE AS
Date: 2021-01-07 06:32:58
Message-ID: CALj2ACU+7f3cwGEKMdBZteQDoczmgvYg_HXO6q2U-ULWwWG=Yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attaching v21 patch set, which has following changes:
1) 0001 - changed fpes->ins_cmd_type ==
PARALLEL_INSERT_CMD_CREATE_TABLE_AS to fpes->ins_cmd_type !=
PARALLEL_INSERT_CMD_UNDEF
2) 0002 - reworded the commit message.
3) 0003 - added cmin, xmin test case to one of the parallel insert
cases to ensure leader and worker insert the tuples in the same xact
and replaced memory usage output in numbers like 25kB to NkB to make
the tests stable.
4) 0004 - updated one of the test output to be in NkB and made the
assertion in SetParallelInsertState to be not under an if condition.

There's one open point [1] on selective skipping of error "cannot
insert tuples in a parallel worker" in heap_prepare_insert(), thoughts
are welcome.

Please consider the v21 patch set for further review.

[1] - https://www.postgresql.org/message-id/CALj2ACXmbka1P5pxOV2vU-Go3UPTtsPqZXE8nKW1mE49MQcZtw%40mail.gmail.com

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v21-0001-Parallel-Inserts-in-CREATE-TABLE-AS.patch application/x-patch 36.3 KB
v21-0002-Tuple-Cost-Adjustment-for-Parallel-Inserts-in-CTAS.patch application/x-patch 15.5 KB
v21-0003-Tests-And-Docs-For-Parallel-Inserts-in-CTAS.patch application/x-patch 30.4 KB
v21-0004-Enable-CTAS-Parallel-Inserts-For-Append.patch application/x-patch 46.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-01-07 06:42:17 Re: data_checksums enabled by default (was: Move --data-checksums to common options in initdb --help)
Previous Message Craig Ringer 2021-01-07 06:16:38 Re: [PATCH] Identify LWLocks in tracepoints