Postgresql create tablespace permission denied on windows 10

Viewed 413

I'm trying to create a new tablespace in postgres on windows 10 on a new partition as original one is running out of space using command:

CREATE TABLESPACE tablespace_p
OWNER postgres
LOCATION 'P:\postgres_tablespace_p';

The issue is that I get permission denied error [42501]:

ERROR: could not set permissions on directory "P:\postgres_tablespace_p": Permission denied
SQL state: 42501

What can cause the issue? How to setup permissions/roles?

0 Answers
Related