Re: SOC & user quotas

From: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: SOC & user quotas
Date: 2007-02-28 21:35:25
Message-ID: Pine.LNX.4.64.0703010027400.14175@lnfm1.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 28 Feb 2007, Tom Lane wrote:

> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>> Martijn van Oosterhout wrote:
>>> Generally, rolling back a transaction doesn't reduce the amount of disk
>>> used. Only VACUUM FULL actually shrinks relations.
>
>> Right, but what I mean was -- if we rollback because we hit quota we
>> could potentially cause even more maintenance to have to happen (vacuum).
>
> It's worse than that, because VACUUM FULL will actually bloat the
> indexes on the way to being able to reduce the table size (since it has
> to make new index entries for rows it moves). If the limit is strictly
> enforced then a user who has reached his quota is really totally
> screwed: the only easy way to get back under quota will be to completely
> drop tables, ie, discard data. VACUUM probably won't reduce the
> physical table size much, and VACUUM FULL will fail, and other
> approaches such as CLUSTER won't work either.

I don't know, but in my opinion, I don't see anything bad in requiring
dropping the data if the quota is full. That's what usually occurs in the
case of normal filesystem quota... If you don't have a space there, you
cannot edit files, copy them etc...
And that solution should be definitely better than the filesystem quota
for the PostgreSQL user for example.

regards,
Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Cambridge Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math(at)sai(dot)msu(dot)ru

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2007-02-28 21:46:26 Re: COMMIT NOWAIT Performance Option
Previous Message Oleg Bartunov 2007-02-28 21:23:58 Re: SOC & user quotas