public inbox for [email protected]  
help / color / mirror / Atom feed
From: Madyshev Egor <[email protected]>
To: Boris Mironov <[email protected]>
To: [email protected] <[email protected]>
Subject: RE: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)
Date: Mon, 9 Feb 2026 13:19:45 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <PH0PR08MB70207B96C493E5777DB4D6428866A@PH0PR08MB7020.namprd08.prod.outlook.com>
References: <DS0PR08MB9565D91414C65B3AC363825488CFA@DS0PR08MB9565.namprd08.prod.outlook.com>
	<CAExHW5vtdtd5QnFobxOhbVeh5jk3_61zYRxLqCXEZpO3jOeFDg@mail.gmail.com>
	<DS0PR08MB9565C0B8B45F7B8D78D89EA188CAA@DS0PR08MB9565.namprd08.prod.outlook.com>
	<CAExHW5umH2K5w_5GRCWGrRHfceMjVn72hF=z_A7G+vReryx0uw@mail.gmail.com>
	<DS0PR08MB956560D79EA051E98688F78088CAA@DS0PR08MB9565.namprd08.prod.outlook.com>
	<CAExHW5vFMkBfv9zB3c5gxF=VLkR7dxM2a3pSFsNuz4JYqc8wRA@mail.gmail.com>
	<PH0PR08MB7020CE2AE1B6937BD01B852F88C9A@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB702059D610C7D84594CD3BB388D5A@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB70201EC778A20A2BDC8A5F4A88D2A@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB7020802F14B1AC122AAB6F7588D3A@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB702075EB12438C2F9A32CD26889EA@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB70205C9C827602026F60FA07889FA@PH0PR08MB7020.namprd08.prod.outlook.com>
	<[email protected]>
	<PH0PR08MB70206B42F5A79A518B610815889FA@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB70204888D724794BA83EA6E58866A@PH0PR08MB7020.namprd08.prod.outlook.com>
	<PH0PR08MB70207B96C493E5777DB4D6428866A@PH0PR08MB7020.namprd08.prod.outlook.com>

Hello, Boris

Thank you for making new productivity measurements. I`ve reviewed the v7 
version and have some feedback below.

1. Perhaps we should rename functions initRowMethodBin to 
initRowMethodBinary, initPopulateTableText to initPopulateTableTextCopy, 
initPopulateTableBinary to initPopulateTableBinaryCopy, 
initGenerateDataClientSideText to initGenerateDataClientSideTextFrmt, 
initGenerateDataClientSideBinary to initGenerateDataClientSideBinaryFrmt 
for better clarity.

2. The --help output currently describes only the 'M' mode. Should we 
also add a description for the 'S' mode for completeness?

3. I`m wondering if the default value for the 'filler' column in 
initCreateTables is necessary? The current functionality seems 
unaffected, so perhaps we could avoid changing this function to keep the 
diff minimal.

4. I noticed that vanilla client functionality in M mode is not 
implemented. Is there a specific reason for this? It seems feasible to 
implement by passing a counter, similar to how it`s done in 
initPopulateTableBinary. If there are reasons not to implement it, in 
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 
thing to do implement write progress of generating data and 'quiet' mode, 
as it already implement in client text format generation g.

6. In bufferData, when len == 1, we call bufferCharData, which already 
increments bin_copy_buffer_length. However, at the end of bufferCharData 
we increment it again, leading to a double increment.

7. I suggest adding column count in function initPopulateTableBinary, 
and initBranchBinary, initTellerBinary, initAccountBinary, to pass it 
from initAccountBinary to init_row, and use it in functions 
initBranchBinary, initTellerBinary, initAccountBinary. This will 
increase the readability of the code, and remove the magic numbers in 
the addColumnCounter call.

8. I think check and install data_generation_type in function 
checkInitSteps is not quite right. In the current realization, pgbench 
allows run data generation many times (dtCdtC...), so i suggest do not 
touching this functionality. My suggestion would be to revert all the 
changes from function checkInitSteps, set the data_generation_type in 
switch in runInitSteps and remove call function checkInitSteps 
from main.


Best regards,
Egor






view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: RE: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox