My server is Windows Server 2016. The server mounted a NFS remote storage with below command:
mount \\192.168.6.68\nfsshare z: mkdir z:\pg_data
All the relevant permissions such as read/write/execute were set correctly on z:
I installed PostgreSQL 12.3 to C:\PostgreSQL. And then created tablespace with below commands:
create tablespace my_db_space location 'z:\pg_data'
PostgreSQL replied me:
Error, directory 'z:\pg_data' does not exist.
I also tried 'z:\pg_data', 'z:/pg_data', but all got the same error message.
I also tried another way, which is, I installed PostgreSQL in Z:\postgresql. The installation was successful. but postgreSQL service failed to start because of the error "directory not found".
In Linux, the same situation didn't happen the same error.
It seems that on Windows, PostgreSQL can only use local storage as its data location, right?
Any siggestion ?