Use COPY for populating all pgbench tables

Tristan Partin <tristan@neon.tech>

From: "Tristan Partin" <tristan@neon.tech>
To: <pgsql-hackers@postgresql.org>
Date: 2023-05-23T17:33:21Z
Lists: pgsql-hackers

Attachments

Hello,

We (Neon) have noticed that pgbench can be quite slow to populate data
in regard to higher latency connections. Higher scale factors exacerbate
this problem. Some employees work on a different continent than the
databases they might be benchmarking. By moving pgbench to use COPY for
populating all tables, we can reduce some of the time pgbench takes for
this particular step. 

I wanted to come with benchmarks, but unfortunately I won't have them
until next month. I can follow-up in a future email.

-- 
Tristan Partin
Neon (https://neon.tech)

Commits

  1. pgbench: Use COPY for client-side data generation

  2. pgbench: Add TAP tests to check consistency of data generated

  3. pgbench: Move constant into format string