Re: Parallel Inserts in CREATE TABLE AS

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Luc Vlaming <luc(at)swarm64(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Zhihong Yu <zyu(at)yugabyte(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: Parallel Inserts in CREATE TABLE AS
Date: 2021-05-27 06:43:39
Message-ID: CAFiTN-vRLMZTOPvEvXo=s0Omti4hGG6Vozvuw2dKLvB3gDojZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 27 May 2021 at 11:32 AM, tsunakawa(dot)takay(at)fujitsu(dot)com <
tsunakawa(dot)takay(at)fujitsu(dot)com> wrote:

> From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
> > I think some other cause of contention on relation extension locks are
> > 1. CTAS is using a buffer strategy and due to that, it might need to
> > evict out the buffer frequently for getting the new block in. Maybe
> > we can identify by turning off the buffer strategy for CTAS and
> > increasing the shared buffer so that data fits in memory.
>
> Yes, both Bhrath-san (on a rich-man's machine) and I (on a poor-man's VM)
> saw that it's effective. I think we should remove this shackle from CTAS.
>
> The question is why CTAS chose to use BULKWRITE strategy in the past. We
> need to know that to make a better decision.

Basically you are creating a new table and loading data to it and that
means you will be less likely to access those data soon so for such thing
spoiling buffer cache may not be a good idea. I was just suggesting only
for experiments for identifying the root cause.

>
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2021-05-27 06:49:01 RE: Parallel Inserts in CREATE TABLE AS
Previous Message Kyotaro Horiguchi 2021-05-27 06:39:29 Re: Race condition in recovery?