snippetsqlMinor
How to create a tablespace on Windows 7 for Postgresql 9.2?
Viewed 0 times
postgresqltablespacecreateforwindowshow
Problem
I try to run this simple command:
However, the tablespace is not created and I got this message:
For non french speakers:
I didn't find any postgres user (
How to give access to the directory to postgres?
Windows 7
Postgres 9.2
CREATE TABLESPACE tb_rec
OWNER postgres
LOCATION 'd:/tablespaces';However, the tablespace is not created and I got this message:
ERREUR: n'a pas pu configurer les droits du répertoire « d:/tablespaces » : Permission deniedFor non french speakers:
ERROR: was not able to configure the directory rights « d:/tablespaces » : Permission deniedI didn't find any postgres user (
net user) and I'm stuck on this... How to give access to the directory to postgres?
Windows 7
Postgres 9.2
Solution
For PostgreSQL 9.2 and above there is no
Create
postgres system user (by default). It runs as NETWORK SERVICE.Create
d:\tablespaces and give the NETWORK SERVICE (SERVICE RÉSEAU in french) "Full control" over it. That should do the trick.Context
StackExchange Database Administrators Q#83041, answer score: 7
Revisions (0)
No revisions yet.