cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Using PostgreSQL as the model data provider

ahamad
6-Contributor

Using PostgreSQL as the model data provider

Hi,

 

I installed Thingworx using twxFoundationH2Trial-8.3.2-linux-x64-installer.run and I'm trying to make it use Postgresql as the model provider. I edited platform-settings.json to point to postgresql but it seems to have no effect. I have Postgresql installed and configured on a different machine and the storage folder is /ThingworxPostgresqlStorage. I can telnet port 5432 from Thingworx machine and I have run the scripts thingworxPostgresDBSetup.sh and thingworxPostgresSchemaSetup.sh and I can see the schema and all the tables created in Postgresql

 

platform-settings.json

{
  "PlatformSettingsConfig": {
    "BasicSettings": {
      "InternalAesCryptographicKeyLength": 128,
      "BackupStorage": "/opt/twxFoundationH2Trial-8.3.2/tomcat/apache-tomcat-8.5.23/ThingworxBackupStorage",
      "DatabaseLogRetentionPolicy": 7,
      "EnableBackup": true,
      "EnableHA": false,
      "EnableSystemLogging": true,
      "HTTPRequestHeaderMaxLength": 2000,
      "HTTPRequestParameterMaxLength": 2000,
      "Storage": "/opt/twxFoundationH2Trial-8.3.2/tomcat/apache-tomcat-8.5.23/ThingworxStorage"
    },
    "AdministratorUserSettings": {
      "InitialPassword": "<password>"
    }
  },
  "PersistenceProviderPackageConfigs": {
    "PostgresPersistenceProviderPackage": {
      "ConnectionInformation": {
        "jdbcUrl": "jdbc:postgresql://10.6.0.33:5432/thingworx",
        "password": "<password>",
        "username": "twadmin"
      }
    }
  }
}
1 ACCEPTED SOLUTION

Accepted Solutions

Hi

you have installed the H2 version - so by default only H2 is used for the ThingWorx model:

twxFoundationH2Trial-8.3.2-linux-x64-installer

The Postgresql can then only be configured inside the ThingWorx Composer as an additional Persistence Provider to store Streams / Value Stream / Data Tables.

All other data (including meta data) will be saved in the H2 database.

 

If you want to switch to a full Postgresql setup, you will need to export everything from the current system - install a new system based on Postgresql and import all the Entities into the new System.

 

But then I'm not sure if there's a Postgresql Trial version available for download.

 

 

I hope this clarifies the DB usages a bit more.

 

Cheers,

Michael

View solution in original post

2 REPLIES 2

Hi

you have installed the H2 version - so by default only H2 is used for the ThingWorx model:

twxFoundationH2Trial-8.3.2-linux-x64-installer

The Postgresql can then only be configured inside the ThingWorx Composer as an additional Persistence Provider to store Streams / Value Stream / Data Tables.

All other data (including meta data) will be saved in the H2 database.

 

If you want to switch to a full Postgresql setup, you will need to export everything from the current system - install a new system based on Postgresql and import all the Entities into the new System.

 

But then I'm not sure if there's a Postgresql Trial version available for download.

 

 

I hope this clarifies the DB usages a bit more.

 

Cheers,

Michael

ahamad
6-Contributor
(To:mneumann)

Thanks Michael that clarifies it

Top Tags