Unix Technical Forum

Schema's versus tablespace

This is a discussion on Schema's versus tablespace within the Pgsql General forums, part of the PostgreSQL category; --> Hi list, We have developed a system that is running as an ASP application, currently we are using Postgresql ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 09:59 AM
Dick Kniep
 
Posts: n/a
Default Schema's versus tablespace

Hi list,

We have developed a system that is running as an ASP application, currently we
are using Postgresql 7.4. For every customer we have a separate schema, and
this works OK. Now in version 8, tablespaces were introduced. This summer we
are planning to migrate to version 8.1. Question is if there are advantages
to use tablespaces instead of schema's?

Keep up the good work

Cheers,
Dick Kniep

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 09:59 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: Schema's versus tablespace

On Tue, Mar 28, 2006 at 09:41:46AM +0200, Dick Kniep wrote:
> Hi list,
>
> We have developed a system that is running as an ASP application, currently we
> are using Postgresql 7.4. For every customer we have a separate schema, and
> this works OK. Now in version 8, tablespaces were introduced. This summerwe
> are planning to migrate to version 8.1. Question is if there are advantages
> to use tablespaces instead of schema's?


Schemas related to how your tables are logically divided up.
Tablespaces are about where the tables are actually stored on disk. As
such they have nothing to do with eachother. You can mix and match as
you please.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEKOo0IB7bNG8LQkwRAjVwAJ9nRYnVL8UrtV7eVN6bol cHbIAcpgCeI2YN
XqyGBtqHX9LI5mxFizvJBEw=
=DuLG
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 09:59 AM
Dick Kniep
 
Posts: n/a
Default Re: Schema's versus tablespace

OK, that's cleared, thanks,

Now another question related to this. In 7.4.8 I have a schema with the
following authorization:

CREATE SCHEMA adeuxproductie
AUTHORIZATION postgres;
GRANT ALL ON SCHEMA adeuxproductie TO postgres;
GRANT ALL ON SCHEMA adeuxproductie TO GROUP adeuxproductie;
COMMENT ON SCHEMA adeuxproductie IS 'Standard production schema';

Now when I try to access the tables/views in the schema as a user that is NOT
a member of the group adeuxproductie, I expect it to fail. However, access is
granted as if there is no authorization specified.

Is this a bug, or do I misunderstand something?

Cheers,
Dick

On Tuesday 28 March 2006 09:48, Martijn van Oosterhout wrote:
> On Tue, Mar 28, 2006 at 09:41:46AM +0200, Dick Kniep wrote:
> > Hi list,
> >
> > We have developed a system that is running as an ASP application,
> > currently we are using Postgresql 7.4. For every customer we have a
> > separate schema, and this works OK. Now in version 8, tablespaces were
> > introduced. This summer we are planning to migrate to version 8.1.
> > Question is if there are advantages to use tablespaces instead of
> > schema's?

>
> Schemas related to how your tables are logically divided up.
> Tablespaces are about where the tables are actually stored on disk. As
> such they have nothing to do with eachother. You can mix and match as
> you please.
>
> Have a nice day,


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-09-2008, 10:00 AM
Tom Lane
 
Posts: n/a
Default Re: Schema's versus tablespace

Dick Kniep <dick@kniep.nl> writes:
> Now when I try to access the tables/views in the schema as a user that
> is NOT a member of the group adeuxproductie, I expect it to
> fail. However, access is granted as if there is no authorization
> specified.


Perhaps you tested this as a superuser? For ordinary users it
definitely would fail.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com