Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 074352E0032 for ; Sat, 19 Apr 2008 13:14:07 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75476-02 for ; Sat, 19 Apr 2008 13:14:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id 4502B2E002C for ; Sat, 19 Apr 2008 13:14:04 -0300 (ADT) Received: from [192.168.1.226] (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m3JGEh6G020040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Apr 2008 09:14:43 -0700 Message-ID: <480A1A55.6090800@commandprompt.com> Date: Sat, 19 Apr 2008 09:14:13 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Graham Leggett CC: Tom Lane , pgsql-admin@postgresql.org Subject: Re: Could not create a tablespace - permission denied References: <4809EC7B.6060902@sharp.fm> <9189.1208619241@sss.pgh.pa.us> <480A12F5.5060609@sharp.fm> <9478.1208620229@sss.pgh.pa.us> <480A190B.80408@sharp.fm> In-Reply-To: <480A190B.80408@sharp.fm> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Sat, 19 Apr 2008 09:14:43 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/202 X-Sequence-Number: 28966 Graham Leggett wrote: > After the postgres user was granted permission to access the tablespace > directory, and after it was verified that the postgres user was able to > access the tablespace directory, postgresql refused to allow the > tablespace to be created until the postgresql server was restarted. I am pretty sure you are missing something. I can not reproduce your issue: jd@scratch:~$ mkdir /tmp/foo jd@scratch:~$ psql -U postgres postgres=# \h create tablespace Command: CREATE TABLESPACE Description: define a new tablespace Syntax: CREATE TABLESPACE tablespacename [ OWNER username ] LOCATION 'directory' postgres=# create tablespace foobar location '/tmp/foo'; ERROR: could not set permissions on directory "/tmp/foo": Operation not permitted postgres=# [1]+ Stopped psql -U postgres jd@scratch:~$ sudo su - [sudo] password for jd: root@scratch:~# chown postgres:postgres /tmp/foo root@scratch:~# exit logout jd@scratch:~$ fg psql -U postgres postgres=# create tablespace foobar location '/tmp/foo'; CREATE TABLESPACE postgres=# But I am glad your problem is resolved. Joshua D. Drake