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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to change the PostgreSQL server used by the Default Persistence Provider

???-31
1-Newbie

How to change the PostgreSQL server used by the Default Persistence Provider

Hello,

Can we change the PostgreSQL server that is used by the default persistence provider?

I want all the data (including thing_model etc..) be stored in the remote postgres.

I have installed a postgres in the remote server and create persistence provider that use it.

This persistence provider worked and the data of Value Streams or Data Tables were stored in the remote server.

However, the model data I created were still stored in the local postgres (ThingworxPersistenceProvider),

although I had set remote persistence provider as 'Default Persistence Provider.'

ThingworxPersistenceProvider is a system object and its "JDBC URL" is fixed to "localhost:5432."

Are there any way to change this?

If we can, how to and when can we do it?

Thanks,

Shunsuke Yamabe.

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:???-31)

Correct. Point to a different PostGreSQL instance

At this time the model can't be split over multiple DBs

View solution in original post

5 REPLIES 5
PaiChung
22-Sapphire I
(To:???-31)

You would have to create additional Persistence providers and use those when you create a new Stream/DataTable/Wiki/Blog/ValueStream

posipova
20-Turquoise
(To:???-31)

I might not understand the issue fully, but if what Pai suggested does not resolve the problem, you may also check the configuration location of where postgresql would write data. To do so, find the thingworxPostgresDBSetup.sh script, open it to edit:

tablespace_location="/ThingworxPostgresqlStorage"

I mean I want to change the actual DB that stores model definition data (not Value Streams).

Now I found that I may configure it through "modelproviderconfig.json."

If we change "jdbcUrl" from localhost:5432 to 192.168.1.2:5432 for example, our model definition data will be stored in the DB on 192.168.1.2 instead of local DB.

Is that correct?

Now I have another question..

Is it possible to store model definition data in multiple DBs?

e.g.

All of the model definition, static property value, and Value Stream of ThingA are stored in the DB1,

and the counterparts of ThingB are in the DB2.

PaiChung
22-Sapphire I
(To:???-31)

Correct. Point to a different PostGreSQL instance

At this time the model can't be split over multiple DBs

I c, thanks.

Top Tags