Re: Parallel INSERT (INTO ... SELECT ...)

From: Greg Nancarrow <gregn4422(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Date: 2020-09-23 08:50:22
Message-ID: CAJcOf-d9uzCb_7wCEuNVMXsM0c7ptamh8HVD6wapTi7wYEONSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> - When INSERTs are made parallel, currently the reported row-count in
> the "INSERT 0 <row-count>" status only reflects the rows that the
> leader has processed (not the workers) - so it is obviously less than
> the actual number of rows inserted.

Attached an updated patch which fixes this issue (for parallel
INSERTs, each worker's processed tuple count is communicated in shared
memory back to the leader, where it is added to the global
"es_processed" count).

Attachment Content-Type Size
0002-ParallelInsertSelect.patch application/octet-stream 32.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-09-23 09:11:24 Re: Report error position in partition bound check
Previous Message Daniel Gustafsson 2020-09-23 08:44:20 Re: OpenSSL 3.0.0 compatibility