Re: create tablespaces and users - Mailing list pgsql-admin

From Thomas Kellerer
Subject Re: create tablespaces and users
Date
Msg-id b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net
Whole thread Raw
In response to Re: create tablespaces and users  (Pepe TD Vo <pepevo@yahoo.com>)
List pgsql-admin
Pepe TD Vo schrieb am 15.01.2019 um 15:42:
> so you suggest not to create the tablespace and associate with the
> database, right?  

Correct. 
Unless you used the tablespaces for performance optimization (e.g. spreading the I/O over multiple harddisks) I suggest
tostick with the default tablespace. 
 

> What's about the owner?  Still postgres or create
> user owner?  From Oracle we have 4 schemas for cidr database.

That depends on what you want to allow the users. 

You can e.g. create 4 database and make each user the owner of that database. 
So every user has full control over their database and the data is clearly separated. 

If the users need to access tables from other users (e.g. in a JOIN), then it's best to create a single database with 4
schemas.
 
In that case "postgres" should be the database owner. 

Then create a schema for each user (making the users the owner of those schemas), and you have a setup which is very
similarto Oracle.
 

I would also revoke all grants from the public schema, so that the users don't accidentally create objects there. 

Thomas



pgsql-admin by date:

Previous
From: Devendra Yadav
Date:
Subject: Re: Re: Postgresql Windows Authentication
Next
From: Ashif Shaikh
Date:
Subject: How to set default owner of objects in Postgresql