Tablespace permissions issue - Mailing list pgsql-hackers

From Gavin Sherry
Subject Tablespace permissions issue
Date
Msg-id Pine.LNX.4.58.0406281529570.16981@linuxworld.com.au
Whole thread Raw
Responses Re: Tablespace permissions issue  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Tablespace permissions issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Chris KL just raised an issue on IRC:

test=> create table test (a int4) tablespace pg_default;
ERROR:  permission denied for tablespace pg_default

This wasn't encountered in my original patch because
pg_tablespace_aclmask() had this test reasonably early on:

+   if(tbloid == DEFAULTTBLSPC)
+       return (mask);

I guess that might have been a bit presumptuous but a similar thing
happens if you don't specify a tablespace:
       tablespaceId = get_namespace_tablespace(namespaceId);       /* note no permission check on tablespace in this
case*/
 

What should the solution be?

Gavin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: lock timeout patch
Next
From: Satoshi Nagayasu
Date:
Subject: Re: lock timeout patch