Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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.
Solved! Go to Solution.
Correct. Point to a different PostGreSQL instance
At this time the model can't be split over multiple DBs
You would have to create additional Persistence providers and use those when you create a new Stream/DataTable/Wiki/Blog/ValueStream
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.
Correct. Point to a different PostGreSQL instance
At this time the model can't be split over multiple DBs
I c, thanks.