Re: SOC & user quotas - Mailing list pgsql-hackers

From Sergey E. Koposov
Subject Re: SOC & user quotas
Date
Msg-id Pine.LNX.4.64.0703010027400.14175@lnfm1.sai.msu.ru
Whole thread Raw
In response to Re: SOC & user quotas  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SOC & user quotas  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
On Wed, 28 Feb 2007, Tom Lane wrote:

> "Joshua D. Drake" <jd@commandprompt.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@sai.msu.ru


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: SOC & user quotas
Next
From: "Jonah H. Harris"
Date:
Subject: Re: COMMIT NOWAIT Performance Option