Re: create tablespaces and users

From: Pepe TD Vo <pepevo(at)yahoo(dot)com>
To: Pepe TD Vo <pepevo(at)yahoo(dot)com>, Thomas Kellerer <spam_eater(at)gmx(dot)net>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: create tablespaces and users
Date: 2019-01-15 17:57:50
Message-ID: 442357970.589897.1547575070485@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

In Oracle, we set up each “schema”/user for each developer and/or each database login. This allowed the schema logon into their own database and create their own tables/function/triggers, etc....  How do I avoid all people logon into the postgres db but their own schema/pgsql user?
thank you.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

On Tuesday, January 15, 2019 9:42 AM, Pepe TD Vo <pepevo(at)yahoo(dot)com> wrote:

so you suggest not to create the tablespace and associate with the database, right?  What's about the owner?  Still postgres or create user owner?  From Oracle we have 4 schemas for cidr database.
CREATE DATABASE "CIDR"    WITH     OWNER = postgres   --> or new users????    ENCODING = 'UTF8'    LC_COLLATE = 'en_US.UTF-8'    LC_CTYPE = 'en_US.UTF-8'    TABLESPACE = pg_default    CONNECTION LIMIT = -1; thank you.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

On Tuesday, January 15, 2019 2:26 AM, Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:

Pepe TD Vo schrieb am 14.01.2019 um 16:24:
> From oracle databases, I have few tablespaces and users created for
> that particular database.  How could I do the same for postgres?

The question is: what was the reason to use tablespaces in Oracle?

Most of the time I see an Oracle installation with a tablespace per user, it's to manage space more easily.

As Postgres does not store data in one huge file, this is not really relevant here.
As soon as a table is dropped, the space is released from the filesystem.

So just create the users and let them use the default tablespace, unless you used the tablespaces
to distribute the I/O load to different disks.

Thomas

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2019-01-15 18:07:36 Re: managing multiple db developers
Previous Message Mark Phillips 2019-01-15 17:43:57 managing multiple db developers