Error creating Tablespace on Windows

Started by deepakover 10 years ago4 messagesgeneral
Jump to latest
#1deepak
deepak.pn@gmail.com

Hi,

I am getting this permission denied error on Windows 2008 trying to create
a tablespace.

template1=# create tablespace testtablespace location
'c:/windows/temp1/testtablespace';
ERROR: could not set permissions on directory
"c:/windows/temp1/testtablespace": Permission denied

If I use 'c:/windows/temp/testtablespace' for location, it works.

If I look at properties for c:/windows/temp and c:/windows/temp1, they look
identical (same ownership and read/write permissions).

Any thoughts on what else to check?

This is with Postgresql 9.1.9.

--
Deepak

#2John R Pierce
pierce@hogranch.com
In reply to: deepak (#1)
Re: Error creating Tablespace on Windows

On 11/25/2015 12:01 PM, deepak wrote:

I am getting this permission denied error on Windows 2008 trying to
create a tablespace.

template1=# create tablespace testtablespace location
'c:/windows/temp1/testtablespace';
ERROR: could not set permissions on directory
"c:/windows/temp1/testtablespace": Permission denied

why are you putting database tables in the Windows directory?!? I
would instead put them somewhere like

C:\Users\postgres\AppData\Local\Temp (assuming C:\Users\postgres is
the %USERPROFILE% directory for the postgres service owner...)

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3deepak
deepak.pn@gmail.com
In reply to: John R Pierce (#2)
Re: Error creating Tablespace on Windows

I chose temp only for illustration purposes. Actually the regression test
"tablespace" fails too,
for the same reason, when run from sources (which creates a tablespace
directory under
src/test/regress)

--
Deepak

On Wed, Nov 25, 2015 at 2:15 PM, John R Pierce <pierce@hogranch.com> wrote:

Show quoted text

On 11/25/2015 12:01 PM, deepak wrote:

I am getting this permission denied error on Windows 2008 trying to
create a tablespace.

template1=# create tablespace testtablespace location
'c:/windows/temp1/testtablespace';
ERROR: could not set permissions on directory
"c:/windows/temp1/testtablespace": Permission denied

why are you putting database tables in the Windows directory?!? I would
instead put them somewhere like

C:\Users\postgres\AppData\Local\Temp (assuming C:\Users\postgres is the
%USERPROFILE% directory for the postgres service owner...)

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Daniel Begin
jfd553@hotmail.com
In reply to: deepak (#3)
Re: Error creating Tablespace on Windows

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of deepak
Sent: November-25-15 17:07
To: John R Pierce
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Error creating Tablespace on Windows

I chose temp only for illustration purposes. Actually the regression test "tablespace" fails too,
for the same reason, when run from sources (which creates a tablespace directory under
src/test/regress)

The above query used to work for me. May be you should make sure to use the appropriate owner.
CREATE TABLESPACE workspace1 OWNER postgres LOCATION 'E:\\TempFiles\\pgsqlData';
--
Deepak

On Wed, Nov 25, 2015 at 2:15 PM, John R Pierce <pierce@hogranch.com<mailto:pierce@hogranch.com>> wrote:
On 11/25/2015 12:01 PM, deepak wrote:
I am getting this permission denied error on Windows 2008 trying to create a tablespace.

template1=# create tablespace testtablespace location 'c:/windows/temp1/testtablespace';
ERROR: could not set permissions on directory "c:/windows/temp1/testtablespace": Permission denied

why are you putting database tables in the Windows directory?!? I would instead put them somewhere like

C:\Users\postgres\AppData\Local\Temp (assuming C:\Users\postgres is the %USERPROFILE% directory for the postgres service owner...)

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general