pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-admin@lists.postgresql.org
Subject: Re: create tablespaces and users
Date: Wed, 16 Jan 2019 09:04:21 +0100
Message-ID: <b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net> (raw)
In-Reply-To: <2088852869.450616.1547563351918@mail.yahoo.com>
References: <858026322.18309717.1547479488317.ref@mail.yahoo.com>
	<858026322.18309717.1547479488317@mail.yahoo.com>
	<298a21d9-c6b3-e80b-adf5-4583c9df2f70@gmx.net>
	<2088852869.450616.1547563351918@mail.yahoo.com>

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





view thread (10+ messages)

Message-ID: <b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net>
Permalink:  ../b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net/
Also on:    postgresql.org/message-id/b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: spam_eater@gmx.net, pgsql-admin@lists.postgresql.org
  Subject: Re: create tablespaces and users
  In-Reply-To: <b7f07373-e6c0-c0d7-4827-c144519124aa@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox