Skip to content

Commit b1c1aa5

Browse files
author
Amit Kapila
committed
pgbench: add --partitions and --partition-method options.
These new options allow users to partition the pgbench_accounts table by specifying the number of partitions and partitioning method. The values allowed for partitioning method are range and hash. This feature allows users to measure the overhead of partitioning if any. Author: Fabien COELHO Reviewed-by: Amit Kapila, Amit Langote, Dilip Kumar, Asif Rehman, and Alvaro Herrera Discussion: https://postgr.es/m/alpine.DEB.2.21.1907230826190.7008@lancre
1 parent df86e52 commit b1c1aa5

File tree

4 files changed

+320
-38
lines changed

4 files changed

+320
-38
lines changed

doc/src/sgml/ref/pgbench.sgml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,31 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
306306
</listitem>
307307
</varlistentry>
308308

309+
<varlistentry>
310+
<term><option>--partitions=<replaceable>NUM</replaceable></option></term>
311+
<listitem>
312+
<para>
313+
Create a partitioned <literal>pgbench_accounts</literal> table with
314+
<replaceable>NUM</replaceable> partitions of nearly equal size for
315+
the scaled number of accounts.
316+
Default is <literal>0</literal>, meaning no partitioning.
317+
</para>
318+
</listitem>
319+
</varlistentry>
320+
321+
<varlistentry>
322+
<term><option>--partition-method=<replaceable>NAME</replaceable></option></term>
323+
<listitem>
324+
<para>
325+
Create a partitioned <literal>pgbench_accounts</literal> table with
326+
<replaceable>NAME</replaceable> method.
327+
Expected values are <literal>range</literal> or <literal>hash</literal>.
328+
This option requires that <option>--partitions</option> is set to non-zero.
329+
If unspecified, default is <literal>range</literal>.
330+
</para>
331+
</listitem>
332+
</varlistentry>
333+
309334
<varlistentry>
310335
<term><option>--tablespace=<replaceable>tablespace</replaceable></option></term>
311336
<listitem>

0 commit comments

Comments
 (0)