Skip to main content
Skip table of contents

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.

(info) 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:

  1. Stop the Data Virtuality Server.
  2. Change port on the Data Virtuality Server side in dvconfig.conf.props(.bat).
  3. 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.
  4. 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:

  1. Stop the Data Virtuality Server.

  2. Change password on the Data Virtuality Server side in dvconfig.conf.props(.bat). The password has to be provided in plaintext.
  3. 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.

  4. Start the Data Virtuality Server.

Activating Embedded PostgreSQL superuser Role

  1. Stop the Data Virtuality Server.

  2. Edit pg_hba.conf: change md5 to trust. Restart embedded PostgreSQL to activate new pg_hba.conf-settings.

  3. Login to embedded PostgreSQL as postgres-datavirtuality.
  4. Set a password for postgres-datavirtuality.
  5. Edit pg_hba.conf: change trust to md5. Restart embedded PostgreSQL to activate new pg_hba.conf-settings.
  6. 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.

(info) 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:

  1. Stop the Data Virtuality Server.
  2. Change port on the Data Virtuality Server side in dvconfig.conf.props(.bat).
  3. 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.
  4. 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:

  1. Stop the Data Virtuality Server.

  2. Change password on the Data Virtuality Server side in dvconfig.conf.props(.bat). The password has to be provided in plaintext.
  3. 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.

  4. Start the Data Virtuality Server.

Activating Embedded PostgreSQL superuser Role

  1. Stop the Data Virtuality Server.

  2. Edit pg_hba.conf: change md5 to trust. Restart embedded PostgreSQL to activate new pg_hba.conf-settings.

  3. Login to embedded PostgreSQL as postgres-datavirtuality.
  4. Set a password for postgres-datavirtuality.
  5. Edit pg_hba.conf: change trust to md5. Restart embedded PostgreSQL to activate new pg_hba.conf-settings.
  6. Start the Data Virtuality Server.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.