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 1vpRBa-008SLs-1g for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 13:20:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vpRBY-00AnTY-2m for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 13:20:16 +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 1vpRBY-00AnTQ-1p for pgsql-hackers@lists.postgresql.org; Mon, 09 Feb 2026 13:20:16 +0000 Received: from email.dnscdc.tech ([194.226.250.15]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vpRBW-00000001owK-0SDr for pgsql-hackers@postgresql.org; Mon, 09 Feb 2026 13:20:16 +0000 Received: with id CA6E0280E64; Mon, 9 Feb 2026 20:20:10 +0700 (+07) Received: with id 791C428003A; Mon, 9 Feb 2026 20:20:08 +0700 (+07) From: Madyshev Egor To: Boris Mironov , "pgsql-hackers@postgresql.org" Subject: RE: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) Thread-Topic: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) Thread-Index: AQHcUwuRPlzLCtdZw06GAdoL15fmHbTwZ0aAgAGpzjGAACRkgIAAEcrGgAQQLgCAAG6d+YAGXmPMgAFzjL6AAV1tS4BpseD8gAEgG5GAAGN+EIAAFWg0gArDj2mAAAeBfoAE2r6A Date: Mon, 9 Feb 2026 13:19:45 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 200286 [Feb 09 2026] X-KLMS-AntiSpam-Version: 6.1.1.20 X-KLMS-AntiSpam-Envelope-From: E.Madyshev@ftdata.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2026/02/09 06:48:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2026/02/09 10:14:00 #28193845 X-KLMS-AntiVirus-Status: Clean, skipped List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, Boris Thank you for making new productivity measurements. I`ve reviewed the v7=20 version and have some feedback below. 1. Perhaps we should rename functions initRowMethodBin to=20 initRowMethodBinary, initPopulateTableText to initPopulateTableTextCopy,=20 initPopulateTableBinary to initPopulateTableBinaryCopy,=20 initGenerateDataClientSideText to initGenerateDataClientSideTextFrmt,=20 initGenerateDataClientSideBinary to initGenerateDataClientSideBinaryFrmt=20 for better clarity. 2. The --help output currently describes only the 'M' mode. Should we=20 also add a description for the 'S' mode for completeness? 3. I`m wondering if the default value for the 'filler' column in=20 initCreateTables is necessary? The current functionality seems=20 unaffected, so perhaps we could avoid changing this function to keep the=20 diff minimal. 4. I noticed that vanilla client functionality in M mode is not=20 implemented. Is there a specific reason for this? It seems feasible to=20 implement by passing a counter, similar to how it`s done in=20 initPopulateTableBinary. If there are reasons not to implement it, in=20 mode Mg pgbench should not run mode Sg, it just pg_fatal. 5. In mode client binary format generation c, It would be the right=20 thing to do implement write progress of generating data and 'quiet' mode,=20 as it already implement in client text format generation g. 6. In bufferData, when len =3D=3D 1, we call bufferCharData, which already= =20 increments bin_copy_buffer_length. However, at the end of bufferCharData=20 we increment it again, leading to a double increment. 7. I suggest adding column count in function initPopulateTableBinary,=20 and initBranchBinary, initTellerBinary, initAccountBinary, to pass it=20 from initAccountBinary to init_row, and use it in functions=20 initBranchBinary, initTellerBinary, initAccountBinary. This will=20 increase the readability of the code, and remove the magic numbers in=20 the addColumnCounter call. 8. I think check and install data_generation_type in function=20 checkInitSteps is not quite right. In the current realization, pgbench=20 allows run data generation many times (dtCdtC...), so i suggest do not=20 touching this functionality. My suggestion would be to revert all the=20 changes from function checkInitSteps, set the data_generation_type in=20 switch in runInitSteps and remove call function checkInitSteps=20 from main. Best regards, Egor