Testing and tuning commands v5.6.1
Documentation improvements are made only to the latest version.
As per semantic versioning, PGD minor releases remain backward compatible and may include important bug fixes and enhancements.
We recommend upgrading the latest minor release as soon as possible.
If you want up-to-date information, read the latest PGD documentation.
EDB Postgres Distributed has tools that help with testing and tuning your PGD clusters. For background, see Testing and tuning.
pgd_bench
Synopsis
A benchmarking tool for EDB Postgres Distributed deployments.
pgd_bench [OPTION]... [DBNAME] [DBNAME2]
DBNAME can be a conninfo string of the format:
"host=10.1.1.2 user=postgres dbname=master"
See pgd_bench in Testing and tuning for examples of pgd_bench options and usage.
Options
The pgd_bench command is implemented as a wrapper around the pgbench command. This means that it shares many of the same options and created tables named pgbench as it performs its testing.
Options that are specific to pgd_bench include the following.
Setting mode
-m or --mode
The mode can be set to regular, camo, or failover. The default is regular.
regular— Only a single node is needed to run pgd_bench.camo— A second node must be specified to act as the CAMO partner. (CAMO must be set up.)failover— A second node must be specified to act as the failover.
When using -m failover, an additional option --retry is available. This option
instructs pgd_bench to retry transactions when there's a failover. The --retry
option is automatically enabled when -m camo is used.
Setting GUC variables
-o or --set-option
This option is followed by NAME=VALUE entries, which are applied using the
Postgres SET command on each server that pgd_bench connects to, and only those servers.
The other options are identical to the Postgres pgbench command. For details, see the PostgreSQL pgbench documentation.
The complete list of options (pgd_bench and pgbench) follow.
Initialization options
-i, --initialize— Invoke initialization mode.-I, --init-steps=[dtgGvpf]+(default"dtgvp") — Run selected initialization steps.d— Drop any existing pgbench tables.t— Create the tables used by the standard pgbench scenario.g— Generate data client-side and load it into the standard tables, replacing any data already present.G— Generate data server-side and load it into the standard tables, replacing any data already present.v— InvokeVACUUMon the standard tables.p— Create primary key indexes on the standard tables.f