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 1vKrJs-00BEUK-0Y for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 04:58:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vKrJp-00CB4d-05 for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 04:58:25 +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 1vKrJo-00CB4V-28 for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 04:58:24 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vKrJm-0088ut-0p for pgsql-hackers@postgresql.org; Mon, 17 Nov 2025 04:58:24 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-429c4c65485so3184239f8f.0 for ; Sun, 16 Nov 2025 20:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763355501; x=1763960301; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=V+DcDlyc3SQv5Dq4kQ8xgkQZ6k5cP+2ekAEB/QUEjik=; b=VYNMYU0YvT+tifNqI6jGqx2PmnArCL9CPiMpERSDPC9KUawSf0/mIaavhNi9hwyveS AWMb0lBaFplyJ42/HR6mRVrN4wogeqq58Bj4/WMo/egkJY2obMtXqFD8ubd60ZXtMO1g FSwTb3op2ZJmEtsyDsSWP0ix4qmRxrBAZU6NKcJeII9MTnQ9cFWKLbhldy0+1UalpkZv jRnWZD55qgxCo6Vi2wXH17PDbW+1827v+3ZrhXr7XE4Mft9VUhyFXQud5OZJYVflhD7P puQOWVQtlPMCLB1ypDNurGFfhx3KoVC9pQ14bQK8GyMMDXHwfN+zXBHKS/LhZr4DdM7E ITFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763355501; x=1763960301; h=content-transfer-encoding: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=V+DcDlyc3SQv5Dq4kQ8xgkQZ6k5cP+2ekAEB/QUEjik=; b=lDISAxg6QsQjOM80fKhxlPBwyxQhcyPaHIppCPw905MMJqPixyIjot2BzdaYIZ1j3u IYxmntxO96B+T0rXbXjl9HIoeWoAKq8IBayPXucaHa4b2Von/sIhx8fyx3Hwx60FxBRJ NpiGN9M83DccFXvDYcZ2KVj+9s38HbyX+G9nd2Jl7Fkx4a17GcoEFvG8m9KaUXSmt38a kTx2pMP4jjRUeEVlMO5THu2xPq/P1nAWTitTIFhypLlp0BxkiYa29dYc8XH5+gffUCJH BC4xPnZtpov2ACfqDkYwk0/JpIfgb3dDEJcX9Xngy+zF6Ohs7Z2h5ciom2LL5CYbl80v CIrA== X-Gm-Message-State: AOJu0Yzji6GigQsEWBtsO20cvelQNzGXUU6z+kgKPTpdDEzN8SbdxILG JeSqu+JqyoH9D+4K2Aa52lqnY9idZEI9xWB6PTk1gGOwFcKAVzwryc7uSCa1aVYmsMG7ZZJ2pGc 6ZFwHeZQaRetP9ojfxNQ3u3ofpedTj5E= X-Gm-Gg: ASbGncvj5oLjkrWA4EG+ESTST6flHAMtz/iMTzRHkkPGSi3V7dZa/mEeYdIFmNeAH3+ 2gcMgl8NqbLwuk2q0Xl+pIKYpCueNH5axEqd09Sk81SujomXVGLwZDZ92QeHQuEziM1hWZGFWvw whUuiE4sAnEGcHS2MkWXgGXRL4Q6s+c9Bpz8gqw0JFSVeJCk7pHth77TkfNfwhmndOJJQzkBYw/ pi7BJh8yqxulnlrCYW9w2EBw3Z2bUSod1PURB+s1jepAzp3NbyIPECaEsyNvIedrRuF+xktdFfC cXO/p5A= X-Google-Smtp-Source: AGHT+IGxRoIKxFhnmqKY4409avVFxUfIPEsPewXu7Qzhk31doIj0fnA1QbnnSvESkuoHNCLLaKzL71Ox9cHNFyYL5kw= X-Received: by 2002:adf:b613:0:b0:42b:3155:21da with SMTP id ffacd0b85a97d-42b5932a396mr7986443f8f.2.1763355500650; Sun, 16 Nov 2025 20:58:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ashutosh Bapat Date: Mon, 17 Nov 2025 10:28:08 +0530 X-Gm-Features: AWmQ_blbowGE_E98yJJu_sgmVtIbKFR5qCTekLWKYktGAiOXeew9zKAJtFYo6AE Message-ID: Subject: Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) To: Boris Mironov Cc: "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Nov 14, 2025 at 8:51=E2=80=AFPM Boris Mironov wrote: > > Hi Ashutosh, > > > If there is one method that is better than all others, community will > > be more willing to accept implementation of that one method than > > multiple implementations so as to reduce maintenance burden. > > Ok then. I'll leave "COPY FROM STDIN BINARY" implementation out of 3 only= . > Would you prefer to replace original COPY FROM STDIN TEXT by this > code or add it as new "init-step" (e.g., with code "c")? > TEXT copy may be useful for cross platform client side data generation. BINARY might be useful for same platform client side generation or server side generation. Just a thought, use TEXT or BINARY automatically based on where it's cross-platform or same platform setup. > I also have noted that current code doesn't prevent pgbench parameter > like "--init-steps=3DdtgG". It allows to run data generation step twice. > Each of these "g" and "G" will present own timing in status line. Is this > an oversight or intentional? > I would review the commit a386942bd29b0ef0c9df061392659880d22cdf43 and the discussion thread https://postgr.es/m/alpine.DEB.2.21.1904061826420.3678@lancre mentioned in the commit message to find that out. At first glance it looks like an oversight, but I haven't reviewed the commit and thread myself. That thread might reveal why generate_series() was used instead of BINARY COPY for server side data generation. If it needs to change it's better to start a separate thread and separate patch for that discussion. -- Best Wishes, Ashutosh Bapat