mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add "G" (server-side data generation) as an initialization step in pgbench.
This commit allows --init-steps option in pgbench to accept "G" character meaning server-side data generation as an initialization step. With "G", only limited queries are sent from pgbench client and then data is actually generated in the server. This might make the initialization phase faster if the bandwidth between pgbench client and the server is low. Author: Fabien Coelho Reviewed-by: Anna Endo, Ibrar Ahmed, Fujii Masao Discussion: https://postgr.es/m/alpine.DEB.2.21.1904061826420.3678@lancre
This commit is contained in:
@ -193,12 +193,34 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>g</literal> (Generate data)</term>
|
||||
<term><literal>g</literal> or <literal>G</literal> (Generate data, client-side or server-side)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate data and load it into the standard tables,
|
||||
replacing any data already present.
|
||||
</para>
|
||||
<para>
|
||||
With <literal>g</literal> (client-side data generation),
|
||||
data is generated in <command>pgbench</command> client and then
|
||||
sent to the server. This uses the client/server bandwidth
|
||||
extensively through a <command>COPY</command>.
|
||||
Using <literal>g</literal> causes logging to print one message
|
||||
every 100,000 rows when generating data into
|
||||
<structname>pgbench_accounts</structname> table.
|
||||
</para>
|
||||
<para>
|
||||
With <literal>G</literal> (server-side data generation),
|
||||
only limited queries are sent from <command>pgbench</command>
|
||||
client and then data is actually generated in the server.
|
||||
No significant bandwidth is required for this variant, but
|
||||
the server will do more work.
|
||||
Using <literal>G</literal> causes logging not to print any progress
|
||||
message when generating data into
|
||||
<structname>pgbench_accounts</structname> table.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@ -262,9 +284,13 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
|
||||
<listitem>
|
||||
<para>
|
||||
Switch logging to quiet mode, producing only one progress message per 5
|
||||
seconds. The default logging prints one message each 100000 rows, which
|
||||
seconds. The default logging prints one message each 100,000 rows, which
|
||||
often outputs many lines per second (especially on good hardware).
|
||||
</para>
|
||||
<para>
|
||||
This setting has no effect if <literal>G</literal> is specified
|
||||
in <option>-I</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
Reference in New Issue
Block a user