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

From Fabio Pardi
Subject Re: parallel index creation: maintenance_work_mem not honored?
Date
Msg-id 7441b023-5b3f-6646-0261-c53556f91b3a@portavita.eu
Whole thread Raw
In response to Re: parallel index creation: maintenance_work_mem not honored?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: parallel index creation: maintenance_work_mem not honored?  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-admin
Thanks Peter for your answer,


On 20/06/2022 17:47, Peter Geoghegan wrote:

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.

Just to make sure we are on the same page: every parallel 'CREATE INDEX' writes to temp files, ok.

But why the temp files are always on disk and not in RAM as other operations do? 


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


pgsql-admin by date:

Previous
From: Teja Jakkidi
Date:
Subject: Re: Inactive replication slots
Next
From: Peter Geoghegan
Date:
Subject: Re: parallel index creation: maintenance_work_mem not honored?