I know where is the problem, the problem is with the directory created to store the database.
In the manual, it is written "thingworxpostgresDBSetup –a postgres –u thingworx –l C:\ThingworxPostgresqlStorage", but by default, Thingworx is link to C:\ThingworxStorage. To solve this, I just changed the cmd script to "thingworxPostgresDBSetup –d thingworx –LC:\ThingworxStorage", it works!
note: Remember to set permission to modify this folder (C:\ThingworxStorage) or you will encounter Permission Denied error.
I habe the same problem.
A folder with the name PG_9.4_20... exist in the folder ThingworxStorage.
If I use the SQL create statement from the file thingworx-database-setup.sql.
I get from PostgreSQL this error "FEHLER: konnte Verzeichnis „pg_tblspc/27596/PG_9.4_201409291/28056“ nicht erzeugen: No such file or directory"
If I remove the tablespace thingworx and use the standard tablespace I get no error.
Have you any ideas why the problem is the own tablespace?
I got the same error.
Then I found in batch file it set "SET tablespace_location=/ThingworxPostgresqlStorage", which I suppose is for Linux or alike.
This error disappeared after I changed the location to the path of ↑folder on my drive.
If you don't mind you could give it a go.