| From: | Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com> |
|---|---|
| To: | "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com> |
| Cc: | lakshmi <lakshmigcdac(at)gmail(dot)com>, "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>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Re: parallel data loading for pgbench -i |
| Date: | 2026-10-14 20:59:10 |
| Message-ID: | 89fa1f3c-bd2f-41b0-a9bf-efc3a52b8b19@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Koshi,
On 02/10/2026 11:46, Koshi Shibagaki (Fujitsu) wrote:
> I did some additional testing of v4 and found three issues when parallel
> initialization is combined with range partitioning:
Thanks!
> One possible approach would be to use a scheme similar to v3: create the parent
> and child partitions in the t step, then have each worker TRUNCATE its assigned
> partition and run COPY ... WITH (FREEZE) on it in the same transaction during the g step.
Indeed, I went ahead and updated the patch following this approach. See
attached v5.
> 1. --tablespace is not applied to the standalone child partitions,
> so they are created in the database's default tablespace.
> 2. Running -I G after -I t fails because the t step does not create the child partitions.
> 3. Re-running -I g fails because createStandalonePartitions() attempts to
> create child tables that already exist.
>
> I reproduced issues 2 and 3 with the following commands, respectively:
>
>
> ```
> pgbench -i -I t -j 2 --partitions=4 --partition-method=range postgres
> pgbench -i -I G -j 2 --partitions=4 --partition-method=range postgres
> ```
>
> ```
> pgbench -i -I t -j 2 --partitions=4 --partition-method=range postgres
> pgbench -i -I g -j 2 --partitions=4 --partition-method=range postgres
> pgbench -i -I g -j 2 --partitions=4 --partition-method=range postgres
I've tried the above commands with v5 and confirm they are now working.
--
Thanks,
Mircea Cadariu
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-pgbench-parallelize-account-loading-for-range-par.patch | text/plain | 12.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-10-14 21:07:29 | Re: Fwd: [patch] bufmgr Half state CAS |
| Previous Message | Tom Lane | 2026-10-14 20:56:27 | Re: Wrong results from self-join elimination with different restriction operators |