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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Date: 2020-10-12 03:10:43
Message-ID: CA+hUKGJo6-H1LVQEvorf+djjmsu7sMM4fT9rpsm2seYesikPdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 12, 2020 at 3:42 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> On Sun, Oct 11, 2020 at 1:39 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > pathnode->path.total_cost += subpath->total_cost;
> > - pathnode->path.rows += subpath->rows;
> > + if (returningLists != NIL)
> > + pathnode->path.rows += subpath->rows;
> > total_size += subpath->pathtarget->width * subpath->rows;
> > }

Erm, except the condition should of course cover total_size too.

> Agree, thanks (bug in existing Postgres code, right?)

Yeah, I think we should go ahead and fix that up front. Here's a
version with a commit message.

Attachment Content-Type Size
0001-Fix-row-estimate-for-ModifyTable-paths.patch text/x-patch 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-10-12 03:27:18 Re: BUG #15858: could not stat file - over 4GB
Previous Message Amit Kapila 2020-10-12 03:00:51 Re: [PATCH] Add `truncate` option to subscription commands