Re: parallel index creation: maintenance_work_mem not honored? - Mailing list pgsql-admin

From Peter Geoghegan
Subject Re: parallel index creation: maintenance_work_mem not honored?
Date
Msg-id CAH2-Wz=s47yo-gi5tdE1xneEB9nkBU4stzJMMiJ-Ny5qibkfzg@mail.gmail.com
Whole thread Raw
In response to parallel index creation: maintenance_work_mem not honored?  (Fabio Pardi <f.pardi@portavita.eu>)
Responses Re: parallel index creation: maintenance_work_mem not honored?  (Fabio Pardi <f.pardi@portavita.eu>)
List pgsql-admin
On Mon, Jun 20, 2022 at 2:42 AM Fabio Pardi <f.pardi@portavita.eu> wrote:
> Is this behavior expected? I cannot find mentions on the documentation nor on the literature available to me.

Yes, this is expected. Parallel CREATE INDEX performs its parallel
sort by having workers generate sorted runs, which are written to temp
files, and then having the leader process merge the sorted runs
together as the index is built.

In the case where there is amble maintenance_work_mem, all writes to
and reads from temp files will be sequential.

-- 
Peter Geoghegan



pgsql-admin by date:

Previous
From: Fabio Pardi
Date:
Subject: parallel index creation: maintenance_work_mem not honored?
Next
From: Jeff Janes
Date:
Subject: Re: postrgesql query planner wrong desicion