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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: vignesh C <vignesh21(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-11-04 03:19:04
Message-ID: CAA4eK1+sFjY1+1vb3YqKCp24+8nmJ8qu2qChXM=pE=aAX+vZZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 4, 2020 at 6:11 AM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> On Tue, Nov 3, 2020 at 5:25 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > -> commandType is not used, we can remove it.
> > + * Prepare for entering parallel mode by assigning a FullTransactionId, to be
> > + * included in the transaction state that is serialized in the parallel DSM.
> > + */
> > +void PrepareParallelModeForModify(CmdType commandType)
> > +{
> > + Assert(!IsInParallelMode());
> > +
> > + (void)GetCurrentTransactionId();
> > +}
>
> Thanks, at least for INSERT, it's not needed, so I'll remove it.
>

Or you might want to consider moving the check related to
IsModifySupportedInParallelMode() inside
PrepareParallelModeForModify(). That way the code might look a bit
cleaner.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2020-11-04 03:53:33 RE: extension patch of CREATE OR REPLACE TRIGGER
Previous Message Tatsuro Yamada 2020-11-04 03:04:48 Re: list of extended statistics on psql