Re: parallel data loading for pgbench -i

From: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, lakshmi <lakshmigcdac(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "tomas(at)vondra(dot)me" <tomas(at)vondra(dot)me>
Subject: Re: parallel data loading for pgbench -i
Date: 2026-04-10 18:37:09
Message-ID: ddca6fbd-1e99-4756-8b02-38f7962d464d@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 07/04/2026 10:00, Heikki Linnakangas wrote:
>
> This all makes more sense in the partitioned case. Perhaps we should
> parallelize only when partitioned are used, and use only one thread
> per partition.
>
Thanks for having a look. I attached v3 that parallelizes only the
partitioned case, one thread per partition. Results:

patch:

pgbench -i -s 100 --partitions 10

done in 12.63 s (drop tables 0.05 s, create tables 0.01 s, client-side
generate 5.98 s, vacuum 1.63 s, primary keys 4.96 s).

master:

pgbench -i -s 100 --partitions 10

done in 29.29 s (drop tables 0.00 s, create tables 0.02 s, client-side
generate 16.31 s, vacuum 7.78 s, primary keys 5.18 s).

--
Thanks,
Mircea Cadariu

Attachment Content-Type Size
v3-0001-pgbench-parallelize-account-loading-for-range-partit.patch text/plain 6.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-04-10 18:56:42 Re: Adding REPACK [concurrently]
Previous Message Sandro Santilli 2026-04-10 18:35:36 Re: Eliminating SPI / SQL from some RI triggers - take 3