Re: parallel data loading for pgbench -i
Mircea Cadariu <cadariu.mircea@gmail.com>
From: Mircea Cadariu <cadariu.mircea@gmail.com>
To: lakshmi <lakshmigcdac@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, tomas@vondra.me
Date: 2026-01-29T11:19:05Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-parallel-data-loading-support-to-pgbench.patch (text/plain) patch v1-0001
Hi Lakshmi, On 19/01/2026 09:25, lakshmi wrote: > > Hi Mircea, > > I tested the patch on 19devel and it worked well for me. > Before applying it, |-j| is rejected in pgbench initialization mode as > expected. After applying the patch, |pgbench -i -s 100 -j 10| runs > successfully and shows a clear speedup. > On my system the total runtime dropped to about 9.6s, with client-side > data generation around 3.3s. > I also checked correctness after the run — row counts for > pgbench_accounts, pgbench_branches, and pgbench_tellers all match the > expected values. > > Thanks for working on this, the improvement is very noticeable. > > Best regards, > lakshmi > Thanks for having a look and trying it out! FYI this is one of Tomas Vondra's patch ideas from his blog [1]. I have attached a new version which now includes docs, tests, a proposed commit message, and an attempt to fix the current CI failures (Windows). [1] - https://vondra.me/posts/patch-idea-parallel-pgbench-i -- Thanks, Mircea Cadariu