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 1vuUlL-009B7s-0N for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Feb 2026 12:10:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vuUlJ-00D7Md-2D for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Feb 2026 12:10:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vuUlJ-00D7MV-18 for pgsql-hackers@lists.postgresql.org; Mon, 23 Feb 2026 12:10:05 +0000 Received: from mail-dy1-x1343.google.com ([2607:f8b0:4864:20::1343]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vuUlG-00000000rSm-0hAk for pgsql-hackers@lists.postgresql.org; Mon, 23 Feb 2026 12:10:04 +0000 Received: by mail-dy1-x1343.google.com with SMTP id 5a478bee46e88-2bd9a485bd6so1313015eec.1 for ; Mon, 23 Feb 2026 04:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771848596; cv=none; d=google.com; s=arc-20240605; b=kRrEpx8kS/5okBhIdO0GjwfMHpf3fgOY4iu4cLYdcm0FfnAqw/WZvvAJ99lA+gIuvC 7q8lY3wH5cMFZqVj7fsE9MkLquFZSxGmGiXNKao6oe1oh/UvTDz/HixEav4tJqdO6xjp +/vpiEvaczRBH/FcHBwT0ilUXlYh2kx6Hu+yl+FQwGc9lZndFOeFV8VEgtvcrappWCNY 5K4Exb/gRNLSerye68Qgyq5G+chjKyQ+ooVhEtVaheADxW8wyc/IO/EC8RrKpu9xqr8N J90YwYyKh1/5WsHdbM/kZLBLjeWxk0EGpLi+ku1WAcu955Kksd9/JY6MvbOKvycvXtIq fPFw== 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=wH8yZB5rW0ynVO362NKzYB8GpIShBmyUZkLJm54/8oA=; fh=UeC8hRSZtaE749XNlKmi3f2XoDEd8t/2RKDZkOi5I5M=; b=B/TOGIJLHgAkGgw2iK/KSJNLXgNN6OCv4xfNn5M1B2KrvORYZfktlUj+dMKoObZtRj sASA3WxsNUhsb5CbEGVDTfII9LDQdPzmjqM61Rk6OwGnkSCotElfQ98JNlegE6fZoz+z KYhYzESmtUDpGRWpw+oOxbvfUMgmlSQ+N/dXaW8vG0Sxz4lH65lLN17UJVXwieNnqZ/g +bxwVBVdz1vFT9hlQoM6eh8k3Q+00ZM2adY/eLXVyIFdtu/Q9jGeY1Wa/zbETfUnMH1w xg1etqNDdy++dCQBYOYeawpX3fSK4128HyXaNqr7H8cqErlTYKAkQBLm/XQrXv6TDbe/ 5R/g==; 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=20230601; t=1771848596; x=1772453396; 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=wH8yZB5rW0ynVO362NKzYB8GpIShBmyUZkLJm54/8oA=; b=ZsUc5MEtAt7XjaOnU0KimOmaa2YOCTET3I1PgA+luqCm36FSXSnQi4520xjY4dYQZL HTIOgk5KW327BkV8ipcMKqbKR94puX3k2hXU/ebAt5IqekvyRTVPEA7eZdTh1su4seR8 W/Pd5hRfOX1jEOtpeV8OxuZ9RU0MONj+EYjoSnAQVBirHdbPHK/PldCL1rPMGOqCLDDk sR+ka1tv/5igfvPJavbECkHwwRnbzozEj99B23kpCg+OBcz9qS5vAGc+devevTjZTa44 HsmMHJ1AgCrVLBaW7NV2Vo5zPi/s22tPuHcziDYqRFFFp79CdUTqr4ZjYscf2RARB6dE XXMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771848596; x=1772453396; 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=wH8yZB5rW0ynVO362NKzYB8GpIShBmyUZkLJm54/8oA=; b=vnx8kCnM38V0YYGvNzF18CzIkhmlTj53vhxPQmgXcXdjPPHakkoVHX6KJoH16vQ9eB w5jGMKSSKthlnCqgmjvR0sc6KmSytqMgDhMYJcdDYL2VSd/T5bpEbcxP5aqclfc3nFYy MUX6Bg65yMSNJlJo+LnvxtAIIsgulBygX4X84yqoX0XRSkyHYJhaGnX+WCQf/MLV4s9/ e64uqWR4jht8FIGMgtUJShcJaM3LOfHxaN3L/SSyDt4NKF6pIQlqc7bUYIf1QG8lrSfq rKKRXjMatWJpomUt38nKIAvzOK8KYwiRUhWSuY78f5F5baq3dhqSKo8bRQoTkq508JFY mL9A== X-Forwarded-Encrypted: i=1; AJvYcCXTe7vdV99MOJQnedffNSNI4JxX17F8DOVkxAhA7UQwF6km/KTkmSpcB2WpbZgAtDIArywAaGHIUDyTbwWK@lists.postgresql.org X-Gm-Message-State: AOJu0YyQYo4RD3wNcgjwdWGeZmsZ+00kCSV5tcjTINHQlU3R35F4PmMl caGgXmAVlec52eSxxY+tE6ICtreMI3kT71uiwfOPywS/SpLJ8hMIR9QojRoZaf7Zl2IUPVsYF5C VccfzyjH4aivbo08j3CWbocHmF4q7WyI= X-Gm-Gg: ATEYQzxjHfSHsxOle83YCfmbFN8VT0YHdXXPUfapqWruqezflkU4MfZX9FQwUOy2+Di mmsyqxh3/wIeNCWHt/F/DzCc58R65wD2EtDVhZt1s9q6W20fbv7yX65y3VHOpmX5E+i858Jp1Xl syziu77W+PQ0g8Qj6PivZ5Afu+fH00UEg3coEXnkBIbj1oH3OAM3EVYfov0+WWqq39pDDtitEGV BmV0++uRqm4neBqmNwlRP8KFg2dJT0nAFfZeTu8UrLlKrfcaJmvvAwoNxxv1s9FXxkjBTC7ceHw gWZOqukTGgaxDqe9Gg== X-Received: by 2002:a05:7301:10c1:b0:2b7:fa47:3b37 with SMTP id 5a478bee46e88-2bd7b89c683mr3434533eec.0.1771848595606; Mon, 23 Feb 2026 04:09:55 -0800 (PST) MIME-Version: 1.0 References: <4c1d0b97-a5f8-472c-afdd-bdeb09b93f33@gmail.com> In-Reply-To: From: lakshmi Date: Mon, 23 Feb 2026 17:42:49 +0530 X-Gm-Features: AaiRm51PyfscUB5glZb-wFGlaeSovmzdvQYDNBuWmEenmXJwKS_vYZHlZiKSIOs Message-ID: Subject: Re: parallel data loading for pgbench -i To: "Hayato Kuroda (Fujitsu)" Cc: Mircea Cadariu , PostgreSQL Hackers , "tomas@vondra.me" Content-Type: multipart/alternative; boundary="000000000000231167064b7ca606" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000231167064b7ca606 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 20, 2026 at 3:29=E2=80=AFPM Hayato Kuroda (Fujitsu) < kuroda.hayato@fujitsu.com> wrote: > Dear Iakshmi, > > Thanks for the measurement! > > > For scale 500, the serial initialization on my system takes around 34.3 > seconds. > > Using parallel initialization without partitions (-j 10) makes the > client-side > > data generation noticeably faster,But the overall runtime ends up > slightly > > higher because the vacuum phase becomes much longer. > > To confirm, do you know the reason why the VACUUMing needs more time than > serial case? > > Dear Hayato, Thank you for the question. From what I observed,in the non-partitioned parallel case the data generation phase becomes much faster,but the VACUUM phase takes longer compared to the serial run. My current understanding is that this may be related to multiple workers inserting into the same heap relation.That could potentially affect page locality or increases the amount of freezing work required afterward.In contrast,the partitioned case seems to benefit more clearly,likely because each worker operates on a separate partition and COPY FREEZE reduces the vacuum effort. I have not yet done deeper internal analysis,so this is based on the behavior I measured rather than detailed inspection.If needed,I can try to collect additional statistics to better understand and difference. please let me know if this reasoning aligns with your understanding. Best regards Lakshmi > > > --000000000000231167064b7ca606 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, = Feb 20, 2026 at 3:29=E2=80=AFPM Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote:
<= /div>
Dear Iakshmi,

Thanks for the measurement!

> For scale 500, the serial initialization on my system takes around 34.= 3 seconds.
> Using parallel initialization without partitions (-j 10) makes the cli= ent-side
> data generation noticeably faster,But the overall runtime ends up slig= htly
> higher because the vacuum phase becomes much longer.

To confirm, do you know the reason why the VACUUMing needs more time than s= erial case?

Dear Hayato,

Thank you for the question.
From what I observed,in the non-partitioned parallel case the data genera= tion phase becomes much faster,but the VACUUM phase takes longer compared t= o the serial run.

My current understanding is that this may be relat= ed to multiple workers inserting into the same heap relation.That could pot= entially affect page locality or increases the amount of freezing work requ= ired afterward.In contrast,the partitioned case seems to benefit more clear= ly,likely because each worker operates on a separate partition and COPY FRE= EZE reduces the vacuum effort.

I have not yet done deeper internal a= nalysis,so this is based on the behavior I measured rather than detailed in= spection.If needed,I can try to collect additional statistics to better und= erstand and difference.

please let me know if this reasoning aligns = with your understanding.

Best regards
Lakshmi=C2=A0
=C2= =A0


--000000000000231167064b7ca606--