Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wCFlA-001nr4-0W for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 11:47:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCFl5-006YzA-2q for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 11:47:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wCFl5-006Yz1-1U for pgsql-hackers@lists.postgresql.org; Mon, 13 Apr 2026 11:47:16 +0000 Received: from mail-dy1-x1342.google.com ([2607:f8b0:4864:20::1342]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wCFl4-00000000n5Y-12dC for pgsql-hackers@lists.postgresql.org; Mon, 13 Apr 2026 11:47:15 +0000 Received: by mail-dy1-x1342.google.com with SMTP id 5a478bee46e88-2d17b8fbedaso1697094eec.1 for ; Mon, 13 Apr 2026 04:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776080833; cv=none; d=google.com; s=arc-20240605; b=Ea+wtyj3xI9FCUigD+jWTmIiWWx4bBIwCh7XGEAdVUHFXGUZs/xWL/ZyKGuL6u10/W rP+3QzlD44aylh46OtRn4VQeffj8U7ChlEV2cHeLGcUGeqzSC2Y7A8PzWOC/F78626NT /7CyZIq1BqC6jovCxvKt2DkXBK+VvJLAp22DsUiTV0eWm29iyGnoKUr2vAA3HtGHTe9y HTa9SKrD89qgyQdnyn/mwYD9TfgRXjgfJePEW/uVjdd7yZj0g8NMI0YWJVwXChBOuy2W XSNtnrsN7TgI0XabpndbrFwMW6+F5WnlbOGcwC6LpE+egxy+4hGirlqH2mC40WiYi0rC bNlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=rKHmU6PWGrO3uvGFcSsq1Wyk07BPTmoRnImmsXyNAhY=; fh=9P4rXaV3g+06HU4BoJTMFGULiRL+mEWA82O/iutAZnI=; b=EPfVJdhwpAAbSSkjwJqoeOQqY3U3AFF9rHA0VUCEHTVGRSMUEW7u6YSS8/om4WRQSI YhohF9Uwj2vmWNGEbxT11vaMvqIbAOW8O5WRaU//T2KC3SSABtpfaK3sPUgDMCpGkNiQ h6I+9h5vv/YjPt5bvSJ8jdPZJ6fkxmoghBmmQBqKYsxTWhtoc1jwgAkxRRkybaVRSnug t7j3N+rvrQYscizauW1cm5mZ3A6S+vzV3R5oMrr/v9mZ1CX1E6pmh1wB45mxIxAcW5MT xh7q6dcATUXuep0hKEtaRiKW2kRUdrIn9rusUGB0nyNdg5KK/tQHYWgahCXMrPtENBfY tEhA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776080833; x=1776685633; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rKHmU6PWGrO3uvGFcSsq1Wyk07BPTmoRnImmsXyNAhY=; b=AEb5M4LbVAmShc0DELn+DWkkErnevhO72uDOUi3lJaiupIs3Hw2n+gTuX+j7DhTjxp RNeQDwgJVQrTxMTVqprqsHQzrd1hSVFf9vISKrv7TPtKOc8H+UubM7c7t5b35OhCAqp4 8XB70gASDbGFmbL3NV8ZLfMtcCj8mlys2JfOYEkNotdK7TowYxOTVS345Kh0wPAwvGNJ G1Ai7DaGvYIawjhUQVelgHegDzoevwod5L+6lHutmDOQJXHh5zEeiGz8sSaBNxBj8uN5 lLkljy226nftbgoaj0mFiw9OqQ9+zC+10ES1iW9k4Yf8MBEd+h6cmVsPaCTAZEN65jFG JCvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776080833; x=1776685633; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rKHmU6PWGrO3uvGFcSsq1Wyk07BPTmoRnImmsXyNAhY=; b=DM9M2wEwVO4eGNCIG/7xdd33HSEdDp9qD8CWEbaVAuzIkLMqRspRQuLaN+1iywLR6/ /X/iSN2esgo4oAheeugJJLUUO8Sv6H1PS8mYBWHyyyfhOQU3l0BppTTTXy/SaZAFC58q /h5LgNVBdzFMFcx+GaVnqIqnLLr7+P7zGdWglhLcL6FdFhWDpc5Jp3RWuYeNRF83XTay TckvWIJMdWj9AC+UG+rTEo9CqeGs7n2ouJx7/vmnYWPnuWFxVtYNcR+0mqezY1+r0Kbe O4T7sPNIcTlZg8v0lxpeSPz+FF5og1kH2PUcuwrsA/bFMnoV4B9+CCt4stqqVTCUbWs+ EXnw== X-Gm-Message-State: AOJu0Ywec02c7VrZ1gF5PwHRwBV2o6Imm97VwcdYVxVY6DJpgkPdrZwe vxLXRoKtF32k6VoOwxbeVbKWt7YsLxdJn/2G4Leg8Is3fSj+qy+sFC5MszUZRIFTWA7vnu3uarQ tYZTrxxu7nZJzeJPJrMlvTPamMZ1wDfQ= X-Gm-Gg: AeBDietsS30e4Z5Ilb/AdtiOkNAjamuHPukizEnBE0duJI7vehUPTnE3b+AgCcYW9HG a1E/5u49UbU88ID7fGqfusvRVAwwNYEGgVClHTgF74qiBHXlzIqvzqeDAUpdFYgzIE3REdDiH+y lFPKRiAoCVh3l0OI2XkV8ISiGTW1MbYiS1gNbYQAOxzgyBBsoij6slh4j9Usj8PxuG1H2p2eQdC cHaxn/V55opSVsu0lvrDUWM8irdiwFHIQPHGkr9roZRt5qzjZNERLqGg92PAaVhSpyiX/X74oub VtxXZSg= X-Received: by 2002:a05:7300:a90b:b0:2c7:6218:9830 with SMTP id 5a478bee46e88-2d59b5b3b34mr5176427eec.11.1776080832664; Mon, 13 Apr 2026 04:47:12 -0700 (PDT) MIME-Version: 1.0 References: <4c1d0b97-a5f8-472c-afdd-bdeb09b93f33@gmail.com> <10868918-cdf9-49dc-99af-8e8ccd6e368c@gmail.com> In-Reply-To: From: lakshmi Date: Mon, 13 Apr 2026 17:21:06 +0530 X-Gm-Features: AQROBzCnlQNngIqr_2s22c2mHfgIotHOyqRkUVmEd5Xpn-I9rK7lf714geqv0V4 Message-ID: Subject: Re: parallel data loading for pgbench -i To: "Hayato Kuroda (Fujitsu)" Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000001f9797064f560b2e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001f9797064f560b2e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Hayato, Thanks for your feedback. I tried a few runs with different partition counts. From what I saw, performance doesn=E2=80=99t always improve with more partitions=E2=80=94in = 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=E2=80=99s already done earlier, so it migh= t be worth checking if the extra TRUNCATE is needed. I didn=E2=80=99t see memory issues in my tests, but I understand it could b= ecome a concern with many partitions. Thanks again for the suggestions. Best regards, Lakshmi On Mon, Apr 13, 2026 at 12:53=E2=80=AFPM Hayato Kuroda (Fujitsu) < kuroda.hayato@fujitsu.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 TRUNCAT= E > 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 >=3D nthreads or partitions % nthreads =3D=3D 0 at that time. > > > Best regards, > Hayato Kuroda > FUJITSU LIMITED > > --0000000000001f9797064f560b2e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hayato,

Thanks for your feedback.

I tried= a few runs with different partition counts. From what I saw, performance d= oesn=E2=80=99t always improve with more partitions=E2=80=94in fact, higher = partition counts increase VACUUM time and slow things down.

I also a= gree that having control over the number of workers (like using -j) would h= elp balance this better.

Regarding TRUNCATE, I noticed it=E2=80=99s = already done earlier, so it might be worth checking if the extra TRUNCATE i= s needed.

I didn=E2=80=99t see memory issues in my tests, but I unde= rstand it could become a concern with many partitions.

Thanks again = for the suggestions.

Best regards, =C2=A0
Lakshmi

On Mon, Apr 13, 2026 at 12:53=E2=80=AFPM Hayato Kuroda (Fujitsu) <= kuroda.hayato@fujitsu.com&= gt; wrote:
Dear = Mircea,

Thanks for updating the patch. Now each worker looks like not to create eac= h
child tables, just run TRUNCATE and COPY. But I'm unclear why the TRUNC= ATE is
needed here. Isn't they truncated in initGenerateDataClientSide()->i= nitTruncateTables()
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 t= he table has
many partitions.
Is it possible that we can have -p again for the initialization? We can req= uire
partitions >=3D nthreads or partitions % nthreads =3D=3D 0 at that time.=


Best regards,
Hayato Kuroda
FUJITSU LIMITED

--0000000000001f9797064f560b2e--