Обсуждение: postgresql user quota

Поиск
Список
Период
Сортировка

postgresql user quota

От
"Sandro Serafini"
Дата:
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.

Some ideas??

---
Sandro Serafini
Internet & Multimedia - POP Nextra - NETTuno
Via G.B. Imperiali, 75 - 36100 Vicenza - Italy



Re: postgresql user quota

От
Karel Zak
Дата:
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


Re: postgresql user quota

От
"Sandro Serafini"
Дата:
Hi!

>  And don't forget some_postgresSQL_user != OS_user.

Yes I know, but I would be satisfied :)

>  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.

Ok.... so... when will "quota limit for users" be implemented in postgresql?
:))
It isn't in the todo list... so bad... :(

Thanks for your attention.

---
Sandro Serafini
Internet & Multimedia - POP Nextra - NETTuno
Via G.B. Imperiali, 75 - 36100 Vicenza - Italy



Re: postgresql user quota

От
Karel Zak
Дата:
On Tue, 18 Jul 2000, Sandro Serafini wrote:

> Hi!
>
> >  And don't forget some_postgresSQL_user != OS_user.
>
> Yes I know, but I would be satisfied :)
>
> >  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.
>
> Ok.... so... when will "quota limit for users" be implemented in postgresql?
> :))

 Volunteer? :-)

 Sure, PostgreSQL will have "quota limit for users", but nobody knows when,
but all admins believe that it will soon :-)

                        Karel