Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 7149A2E003B for ; Sat, 19 Apr 2008 13:17:35 -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 74651-06 for ; Sat, 19 Apr 2008 13:17:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id DBB272E0033 for ; Sat, 19 Apr 2008 13:17:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m3JGHVQc009919; Sat, 19 Apr 2008 12:17:32 -0400 (EDT) To: Graham Leggett cc: pgsql-admin@postgresql.org Subject: Re: Could not create a tablespace - permission denied In-reply-to: <480A190B.80408@sharp.fm> 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> Comments: In-reply-to Graham Leggett message dated "Sat, 19 Apr 2008 18:08:43 +0200" Date: Sat, 19 Apr 2008 12:17:31 -0400 Message-ID: <9918.1208621851@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/203 X-Sequence-Number: 28967 Graham Leggett writes: > Tom Lane wrote: >> I think this explanation is fiction ... there is no "cacheing of >> credentials" in there that I know about. > The server is a standard REHL5 installed copy of postgresql, running as > the postgres user (as is standard on RHE5). Both the data directory and > the tablespace are running on ext3 filesystems local to the machine, > there are no NFS mounts anywhere. The machine does not have SELinux > installed, never mind enabled. > 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. Fascinating. I think what you're describing must be a kernel bug --- want to see if you can reproduce it without PG involved? Just make a test program that chmod's, sleeps awhile, and chmod's again, and manually change the permissions while it's sleeping, in the same way that you did in the problem case. regards, tom lane