Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAMEpg_virtualenv - Create a throw-away PostgreSQL environment for running regression tests
OPTIONS] [-v 'version ...'] [command]
DESCRIPTIONpg_virtualenv creates a virtual PostgreSQL server environment, and sets environment variables such that command can access the PostgreSQL database server(s). The servers are destroyed when command exits.
The environment variables
PGPASSWORDwill be set. Per default, a single new cluster is created, using the newest PostgreSQL server version installed. The cluster will use the first available port number starting from 5432, and
PGPORTwill be set.
When clusters for more than one versions are created, they will differ in the port number used, and
PGPORTis not set. The clusters are named version/regress. To access a cluster, set PGCLUSTER=version/regress. For ease of access, the clusters are also registered in /etc/postgresql-common/pg_service.conf, with the version number as cluster name. Clusters can be accessed by passing the connection string "service=version", e.g. psql service=9.2.
When invoked as root, the clusters are created in /etc/postgresql/ as usual; for other users,
PGSYSCONFDIRare set to a temporary directory where all files belonging to the clusters are created.
- Use all PostgreSQL server versions installed.
- -v version ...
- Use these versions (space-separated list).
- -c pg_createcluster options
- Extra options to pass to pg_createcluster.
- -i initdb options
- Extra initdb options to pass to pg_createcluster.
- -o guc=value
Configuration option to set in the
file, passed to pg_createcluster.
- Launch a shell inside the virtual environment when command fails.
- Install clusters in a temporary directory, even when running as root.
- Show program help.
# pg_virtualenv make check
NOTESWhen run with fakeroot(1), pg_virtualenv will fall back to the non-root mode of operation. Running ``fakeroot pg_virtualenv'' as root will fail, though.
- When non-empty, pg_virtualenv will re-exec itself using newpid(1).
- When non-empty, pg_virtualenv will re-exec itself using unshare(1) using these flags.
- When set, the value is used for the (single) cluster created.