Re: postgresql user quota

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Sandro Serafini <s(dot)serafini(at)iam(dot)it>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: postgresql user quota
Date: 2000-07-18 08:25:16
Message-ID: Pine.LNX.3.96.1000718101609.32423B-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Tue, 18 Jul 2000, Sandro Serafini wrote:

> Hi!
>
> I need to limit the postgresql user's quotas on my system...
>
> I noticed that postgres creates a new directory for every database, so I tried
> changing the owner of the directory and the files within the directory to the
> unix user "owner" of the database, setting the group so the postgres daemon
> works.
>
> All works correctly, the postgres user is subject to the system quota and when
> a user inserts too much data inside his tables, the system gives him an error.
>
> BUT... there's a problem... when the postmaster creates new files (for
> example, creating a new table), the new files fall into user "postgres" and
> not the user owning the database.

Yes, because all backends works under postmaster that has "postgres"
OS privilage, but for switch between different OS users software need
"root" privilage (this concept use for example apache - master process
has "root" perms and children has some others). It is not possible in PG.

And don't forget some_postgresSQL_user != OS_user.

For you problem has commercial DB something like tablespace and quota for
users, but all these are *internal* in a DB and DB not use OS quota.

Karel

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sandro Serafini 2000-07-18 10:33:06 Re: postgresql user quota
Previous Message Sandro Serafini 2000-07-18 07:53:24 postgresql user quota