Re: User Quota Implementation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: User Quota Implementation
Date
Msg-id 24014.1118425074@sss.pgh.pa.us
Whole thread Raw
In response to Re: User Quota Implementation  (Josh Berkus <josh@agliodbs.com>)
Responses Re: User Quota Implementation
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> Yeah.  I'd prefer per-database quotas, rather than per-user quotas, which 
> seem kind of useless.   The hard part is making any transaction which 
> would exceed the per-database quota roll back cleanly with a 
> comprehensible error message rather than just having the database shut 
> down.

That part doesn't seem hard to me: we already recover reasonably well
from smgrextend failures.  The real difficulty is in monitoring the
total database size to know when it's time to complain.  We don't
currently make any effort at all to measure that, let alone keep track
of it in real time.

Given that there might be lots of processes concurrently adding pages
in different places, I don't think you could hope for an exact
stop-on-a-dime limit, but maybe if you're willing to accept some fuzz
it is doable ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: User Quota Implementation
Next
From: Kaare Rasmussen
Date:
Subject: Re: The Contrib Roundup (long)