From: | Yann Michel <yann-postgresql(at)spline(dot)de> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: User Quota Implementation |
Date: | 2005-06-11 08:49:26 |
Message-ID: | 20050611084926.GA29435@zoom.spline.inf.fu-berlin.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Josh,
On Fri, Jun 10, 2005 at 02:25:11PM -0700, Josh Berkus wrote:
> > O.K. This makes sens to me. Otherwise I'd like to see quotas per
> > tablespace. As far as I got it, a tablespace may grow in size untile the
> > volume is full. Here a grace quota might be usefull as well. Let's say a
> > 5% threshold like the ext filesystem as an default for generating a
> > warning to th elogs files letting the admin extend the volum(s) by time.
>
> Hmmm ... Tablespace quotas would be *even more* useful than database
> quotas. If it's just as easy for you?
Well, lets see...
What do we need:
- Extension of the "CREATE TABLESPACE" command:
CREATE TABLESPACE tablespacename
[ OWNER username ]
[ SIZE <integer><K | M | G | T> ]
LOCATION 'directory'
- Extension of the "ALTER TABLESPACE" command:
ALTER TABLESPACE name
{RENAME TO newname |
SIZE <integer><K | M | G | T> }
- Storage of this information in the system "tablespace" relation
- Determine the actual size of a tables space
--> Already exists in contrib/dbsize/dbsize.c
- Define the point in time where this calculation should happen.
That's the point where I think some lazyness may appear, i.e. it is
enough to evaluate the size from time to time but not after each
statement. Of cause this will enable that a tablespace may become to
large but once it is to large, further extensions of it will become
prohibited.
- Define how to disable further extension of tablespace objects or
creation of new ones.
- Optional: Define postgresql.conf parameter:
"tablesspace_full_warning = 90"
Whenever the threshold of 90 percent is reached a warning will
be generated (and written to the log-files)
So far from me about my thoughts...
Regards,
Yann
From | Date | Subject | |
---|---|---|---|
Next Message | Jochem van Dieten | 2005-06-11 09:19:40 | Re: Two-phase commit issues |
Previous Message | Heikki Linnakangas | 2005-06-11 08:08:14 | Re: Two-phase commit issues |