Re: parallel data loading for pgbench -i

From: lakshmi <lakshmigcdac(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: parallel data loading for pgbench -i
Date: 2026-04-13 11:51:06
Message-ID: CAEvyyThGm4NHDnfCGeCCOZ1_nrB=Eqct6y55GGuW0_UpTAsu3g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hayato,

Thanks for your feedback.

I tried a few runs with different partition counts. From what I saw,
performance doesn’t always improve with more partitions—in fact, higher
partition counts increase VACUUM time and slow things down.

I also agree that having control over the number of workers (like using -j)
would help balance this better.

Regarding TRUNCATE, I noticed it’s already done earlier, so it might be
worth checking if the extra TRUNCATE is needed.

I didn’t see memory issues in my tests, but I understand it could become a
concern with many partitions.

Thanks again for the suggestions.

Best regards,
Lakshmi

On Mon, Apr 13, 2026 at 12:53 PM Hayato Kuroda (Fujitsu) <
kuroda(dot)hayato(at)fujitsu(dot)com> wrote:

> Dear Mircea,
>
> Thanks for updating the patch. Now each worker looks like not to create
> each
> child tables, just run TRUNCATE and COPY. But I'm unclear why the TRUNCATE
> is
> needed here. Isn't they truncated in
> initGenerateDataClientSide()->initTruncateTables()
> before launching threads?
> Also, the current API is questionable. E.g., we cannot work in series if
> --partition is
> specified. And I'm afraid OOM failure may be more likely to happen if the
> table has
> many partitions.
> Is it possible that we can have -p again for the initialization? We can
> require
> partitions >= nthreads or partitions % nthreads == 0 at that time.
>
>
> Best regards,
> Hayato Kuroda
> FUJITSU LIMITED
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2026-04-13 11:53:39 Re: Heads Up: cirrus-ci is shutting down June 1st
Previous Message Amit Kapila 2026-04-13 11:28:28 Re: Add missing period to HINT messages