1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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
This commit is contained in:
Amit Kapila
2019-10-01 09:50:26 +05:30
parent df86e52cac
commit b1c1aa5318
4 changed files with 320 additions and 38 deletions

View File

@ -306,6 +306,31 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
</listitem>
</varlistentry>
<varlistentry>
<term><option>--partitions=<replaceable>NUM</replaceable></option></term>
<listitem>
<para>
Create a partitioned <literal>pgbench_accounts</literal> table with
<replaceable>NUM</replaceable> partitions of nearly equal size for
the scaled number of accounts.
Default is <literal>0</literal>, meaning no partitioning.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--partition-method=<replaceable>NAME</replaceable></option></term>
<listitem>
<para>
Create a partitioned <literal>pgbench_accounts</literal> table with
<replaceable>NAME</replaceable> method.
Expected values are <literal>range</literal> or <literal>hash</literal>.
This option requires that <option>--partitions</option> is set to non-zero.
If unspecified, default is <literal>range</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--tablespace=<replaceable>tablespace</replaceable></option></term>
<listitem>