External PostgreSQL as Configuration Database
You are looking at an older version of the documentation. The latest version is found here.
Preparing PostgreSQL to be Used by the Data Virtuality Server
Data Virtuality uses a connection pool with a maximum of 100 connections to PostgreSQL. Please ensure the max_connections
parameter of your PostgreSQL instance is set up accordingly.
The configuration database should be secured against external access by disallowing any access from other clients than the Data Virtuality Server using the host-based authentication feature of PostgreSQL. The host-based authentication feature controls network authentication and authorization via the PostgreSQL pg_hba configuration file (pg_hba.conf). The pg_hba.conf file on the Configuration Database server host shall allow connections only from the Data Virtuality Server.
Setting Up the Data Virtuality Server to use an External PostgreSQL
- Stop the Data Virtuality Server
- Edit the /path/to/dvserver/bin/dvconfig.conf.props (Linux) or path\to\dvserver\bin\dvconfig.conf.props.bat (Windows) file:
Disable/comment out the sections that configure and start the embedded PostgreSQL.
Windows (dvconfig.conf.props.bat)
POWERSHELLrem # Configure embedded PostgreSQL as configuration database rem set "JAVA_OPTS=%JAVA_OPTS% -Ddv.dvconfig.type=psql -Ddv.dvlogs.type=psql -Ddv.dvconfig.ds=dvconfig_pg -Ddv.dvlogs.ds=dvconfig_pg" rem set "JAVA_OPTS=%JAVA_OPTS% -Ddv.dvconfig.host=localhost -Ddv.dvconfig.port=54322 -Ddv.dvconfig.db=dvconfig -Ddv.dvconfig.user=dvconfig -Ddv.dvconfig.pwd=dvconfig -Ddv.dvconfig.schema=public -Ddv.dvlogs.schema=public" rem # Configure embedded PostgreSQL as configuration database rem # Start embedded PostgreSQL rem set PGDATADIR="%DVSERVERROOTDIR%\pgsql\data" rem IF NOT EXIST %PGDATADIR% ( call "%DVSERVERROOTDIR%\pgsql\embeddedPg_init.bat" > "%DVSERVERROOTDIR%\standalone\log\embeddedPg_init.log" ) rem call "%DVSERVERROOTDIR%\pgsql\embeddedPg_start.bat" > "%DVSERVERROOTDIR%\standalone\log\embeddedPg_start.log" rem # Start embedded PostgreSQL
Linux (dvconfig.conf.props)
BASH# # Configure embedded PostgreSQL as configuration database # JAVA_OPTS="$JAVA_OPTS -Ddv.dvconfig.type=psql -Ddv.dvlogs.type=psql -Ddv.dvconfig.ds=dvconfig_pg -Ddv.dvlogs.ds=dvconfig_pg" # JAVA_OPTS="$JAVA_OPTS -Ddv.dvconfig.host=localhost -Ddv.dvconfig.port=54322 -Ddv.dvconfig.db=dvconfig -Ddv.dvconfig.user=dvconfig -Ddv.dvconfig.pwd=dvconfig -Ddv.dvconfig.schema=public -Ddv.dvlogs.schema=public" # # Configure embedded PostgreSQL as configuration database # # Start embedded PostgreSQL # PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) # PGDATAFOLDER="${PARENT_PATH}"/../pgsql/data # if [ ! -d "${PGDATAFOLDER}" ]; then # "${PARENT_PATH}"/../pgsql/embeddedPg_init.sh > "${PARENT_PATH}"/../standalone/log/embeddedPg_init.log # fi # "${PARENT_PATH}"/../pgsql/embeddedPg_start.sh > "${PARENT_PATH}"/../standalone/log/embeddedPg_start.log # # Start embedded PostgreSQL
Activate/uncomment the section that configures the external PostgreSQL. Adjust according to your PostgreSQL setup:
Windows (dvconfig.conf.props.bat)
POWERSHELLrem # Configure PostgreSQL as configuration database set "JAVA_OPTS=%JAVA_OPTS% -Ddv.dvconfig.type=psql -Ddv.dvlogs.type=psql -Ddv.dvconfig.ds=dvconfig_pg -Ddv.dvlogs.ds=dvconfig_pg" set "JAVA_OPTS=%JAVA_OPTS% -Ddv.dvconfig.host= -Ddv.dvconfig.port= -Ddv.dvconfig.db= -Ddv.dvconfig.user= -Ddv.dvconfig.pwd= -Ddv.dvconfig.schema= -Ddv.dvlogs.schema=" rem # Configure PostgreSQL as configuration database
Linux (dvconfig.conf.props)
BASH# # Configure PostgreSQL as configuration database JAVA_OPTS="$JAVA_OPTS -Ddv.dvconfig.type=psql -Ddv.dvlogs.type=psql -Ddv.dvconfig.ds=dvconfig_pg -Ddv.dvlogs.ds=dvconfig_pg" JAVA_OPTS="$JAVA_OPTS -Ddv.dvconfig.host= -Ddv.dvconfig.port= -Ddv.dvconfig.db= -Ddv.dvconfig.user= -Ddv.dvconfig.pwd= -Ddv.dvconfig.schema= -Ddv.dvlogs.schema=" # # Configure PostgreSQL as configuration database
dv.dvconfig.host
: the PostgreSQL hostdv.dvconfig.port
: the PostgreSQL port (5432 by default)dv.dvconfig.db
: the database to connect todv.dvconfig.user
: the PostgreSQL user namedv.dvconfig.pwd
: the corresponding user password
- Ensure that the external PostgreSQL is running.
- Start Data Virtuality Server.