Re: create tablespaces and users

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: create tablespaces and users
Date: 2019-01-16 08:04:21
Message-ID: b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 to stick 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 similar to Oracle.

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

Thomas

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ashif Shaikh 2019-01-16 08:40:33 How to set default owner of objects in Postgresql
Previous Message Devendra Yadav 2019-01-16 04:32:08 Re: Re: Postgresql Windows Authentication