Embedded PostgreSQL as Configuration Database
You are looking at an older version of the documentation. The latest version is found here.
Running Data Virtuality Server with Embedded PostgreSQL
Embedded PostgreSQL is enabled
The Data Virtuality Server will initialize and start the embedded PostgreSQL automatically when started
- The embedded PostgreSQL will be automatically stopped on the Data Virtuality Server shutdown
Controlling Embedded PostgreSQL Manually (Windows and Linux)
You can use manual control of embedded PostgreSQL to perform restarts needed by administrative tasks like changing the port, changing the password, or activating the PostgreSQL superuser role.
If the Data Virtuality Server is running, please stop it before starting manual actions on embedded PostgreSQL.
- To initialize embedded PostgreSQL, run
dvserver/pgsql/embeddedpg_initdb.bat/.sh
- To start embedded PostgreSQL, run
dvserver/pgsql/embeddedpg_start.bat/.sh
- To stop embedded PostgreSQL, run
dvserver/pgsql/
embeddedpg_stop.bat/.sh
Changing Embedded PostgreSQL Port
The default port used by embedded PostgreSQL is 54322
. To change it, follow these steps:
- Stop the Data Virtuality Server.
- Change port on the Data Virtuality Server side in dvconfig.conf.props(.bat).
- Change port on embedded PostgreSQL side:
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, run the following commands:
- dvserver/pgsql/embeddedpg_initdb.bat/.sh
- dvserver/pgsql/embeddedPg_configurePgSettings.sql
- If the Data Virtuality Server has been started before, embedded PostgreSQL is initialized, and the data folder is present in the dvserver/pgsql folder, do the following:
- activate the embedded PostgreSQL superuser role;
- connect to embedded PostgreSQL and change port using the
ALTER SYSTEM
command; - stop embedded PostgreSQL.
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, run the following commands:
- Start the Data Virtuality Server.
Changing Password for the dvconfig Role
The default password for role 'dvconfig' is 'dvconfig'
. To change it, you can follow these steps:
Stop the Data Virtuality Server.
- Change password on the Data Virtuality Server side in
dvconfig.conf.props(.bat)
. The password has to be provided in plaintext. - Change password on embedded PostgreSQL side:
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, do the following:
Change password in
embeddedpg_createDbObjects.sql
. The password may be provided encrypted or in plaintext.
- If the Data Virtuality Server has been started before, embedded PostgreSQL is initialized, and the data folder is present in the dvserver/pgsql folder, do the following:
Connect to embedded PostgreSQL and set a new password.
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, do the following:
- Start the Data Virtuality Server.
Activating Embedded PostgreSQL superuser Role
Stop the Data Virtuality Server.
Edit pg_hba.conf: change
md5
totrust
. Restart embedded PostgreSQL to activate newpg_hba.conf
-settings.- Login to embedded PostgreSQL as
postgres-datavirtuality
. - Set a password for
postgres-datavirtuality
. - Edit pg_hba.conf: change
trust
tomd5
. Restart embedded PostgreSQL to activate new pg_hba.conf-settings. - Start the Data Virtuality Server.
Running Data Virtuality Server with Embedded PostgreSQL
Embedded PostgreSQL is enabled
The Data Virtuality Server will initialize and start the embedded PostgreSQL automatically when started
- The embedded PostgreSQL will be automatically stopped on the Data Virtuality Server shutdown
Controlling Embedded PostgreSQL Manually (Windows and Linux)
You can use manual control of embedded PostgreSQL to perform restarts needed by administrative tasks like changing the port, changing the password, or activating the PostgreSQL superuser role.
If the Data Virtuality Server is running, please stop it before starting manual actions on embedded PostgreSQL.
- To initialize embedded PostgreSQL, run
dvserver/pgsql/embeddedpg_initdb.bat/.sh
- To start embedded PostgreSQL, run
dvserver/pgsql/embeddedpg_start.bat/.sh
- To stop embedded PostgreSQL, run
dvserver/pgsql/
embeddedpg_stop.bat/.sh
Changing Embedded PostgreSQL Port
The default port used by embedded PostgreSQL is 54322
. To change it, follow these steps:
- Stop the Data Virtuality Server.
- Change port on the Data Virtuality Server side in dvconfig.conf.props(.bat).
- Change port on embedded PostgreSQL side:
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, run the following commands:
- dvserver/pgsql/embeddedpg_initdb.bat/.sh
- dvserver/pgsql/embeddedPg_configurePgSettings.sql
- If the Data Virtuality Server has been started before, embedded PostgreSQL is initialized, and the data folder is present in the dvserver/pgsql folder, do the following:
- activate the embedded PostgreSQL superuser role;
- connect to embedded PostgreSQL and change port using the
ALTER SYSTEM
command; - stop embedded PostgreSQL.
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, run the following commands:
- Start the Data Virtuality Server.
Changing Password for the dvconfig Role
The default password for role 'dvconfig' is 'dvconfig'
. To change it, you can follow these steps:
Stop the Data Virtuality Server.
- Change password on the Data Virtuality Server side in
dvconfig.conf.props(.bat)
. The password has to be provided in plaintext. - Change password on embedded PostgreSQL side:
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, do the following:
Change password in
embeddedpg_createDbObjects.sql
. The password may be provided encrypted or in plaintext.
- If the Data Virtuality Server has been started before, embedded PostgreSQL is initialized, and the data folder is present in the dvserver/pgsql folder, do the following:
Connect to embedded PostgreSQL and set a new password.
- If the Data Virtuality Server has never been started before, embedded PostgreSQL is not initialized yet, and the data folder is not present in the dvserver/pgsql folder, do the following:
- Start the Data Virtuality Server.
Activating Embedded PostgreSQL superuser Role
Stop the Data Virtuality Server.
Edit pg_hba.conf: change
md5
totrust
. Restart embedded PostgreSQL to activate newpg_hba.conf
-settings.- Login to embedded PostgreSQL as
postgres-datavirtuality
. - Set a password for
postgres-datavirtuality
. - Edit pg_hba.conf: change
trust
tomd5
. Restart embedded PostgreSQL to activate new pg_hba.conf-settings. - Start the Data Virtuality Server.