Thread: quota's ?

quota's ?

From
"Kris Van Hulle"
Date:
Hi...

Is there a way to limit the amount of disk space a PostgreSQL
server can use ? Or to limit this for a specific database on the
server ? (or preferably both ?) (apart from limiting this in an external
way, like the quota's on the linux file system or something like that)
Also, is it possible to limit other things like cpu usage or memory
usage ?

Thnx.

Kris

Re: quota's ?

From
"Richard Huxton"
Date:
From: "Kris Van Hulle" <uxs@compulink.gr>

> Hi...
>
> Is there a way to limit the amount of disk space a PostgreSQL
> server can use ? Or to limit this for a specific database on the
> server ? (or preferably both ?) (apart from limiting this in an external
> way, like the quota's on the linux file system or something like that)
> Also, is it possible to limit other things like cpu usage or memory
> usage ?

AFAIK you can only do this at the OS level. Certainly cpu/memory usage can
be restricted on pretty much all unix-like systems - you'll need to see the
documentation for your specific platform to find how.

Limiting disk usage, you *should* be able to change the group of the various
database files and limit group file usage. I can't say I've tested this
though.

HTH

- Richard Huxton


Re: quota's ?

From
Doug McNaught
Date:
"Richard Huxton" <dev@archonet.com> writes:

> AFAIK you can only do this at the OS level. Certainly cpu/memory usage can
> be restricted on pretty much all unix-like systems - you'll need to see the
> documentation for your specific platform to find how.
>
> Limiting disk usage, you *should* be able to change the group of the various
> database files and limit group file usage. I can't say I've tested this
> though.

Doing this would almost certainly result in a corrupted database once
you ran up against the limit.

-Doug

Re: quota's ?

From
"Richard Huxton"
Date:
From: "Doug McNaught" <doug@wireboard.com>

> "Richard Huxton" <dev@archonet.com> writes:
>
> > Limiting disk usage, you *should* be able to change the group of the
various
> > database files and limit group file usage. I can't say I've tested this
> > though.
>
> Doing this would almost certainly result in a corrupted database once
> you ran up against the limit.
>
> -Doug

Good point - should have been clearer. You'll want to monitor a soft limit
and take separate action based on that.

- Richard Huxton


Re: quota's ?

From
Peter Eisentraut
Date:
Doug McNaught writes:

> "Richard Huxton" <dev@archonet.com> writes:
>
> > AFAIK you can only do this at the OS level. Certainly cpu/memory usage can
> > be restricted on pretty much all unix-like systems - you'll need to see the
> > documentation for your specific platform to find how.
> >
> > Limiting disk usage, you *should* be able to change the group of the various
> > database files and limit group file usage. I can't say I've tested this
> > though.
>
> Doing this would almost certainly result in a corrupted database once
> you ran up against the limit.

I think you can give PostgreSQL a little more credit than that.  ;-)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Re: quota's ?

From
Doug McNaught
Date:
Peter Eisentraut <peter_e@gmx.net> writes:

> Doug McNaught writes:
>
> > Doing this would almost certainly result in a corrupted database once
> > you ran up against the limit.
>
> I think you can give PostgreSQL a little more credit than that.  ;-)

I'm very glad to hear it.  A lot of applications don't cope with
filesystem-full/quota-exceeded very well at all.  ;)

-Doug

Re: quota's ?

From
Adam Haberlach
Date:
On Sat, Apr 07, 2001 at 01:46:48PM -0400, Doug McNaught wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>
> > Doug McNaught writes:
> >
> > > Doing this would almost certainly result in a corrupted database once
> > > you ran up against the limit.
> >
> > I think you can give PostgreSQL a little more credit than that.  ;-)
>
> I'm very glad to hear it.  A lot of applications don't cope with
> filesystem-full/quota-exceeded very well at all.  ;)

    I've not been following postgres-hackers as closely as I should, but
as of the first betas of 7.1, it would corrupt your database horribly
if you ran out of space.

    I think this has been fixed, but you might wanna check with hackers or
release nots.

--
Adam Haberlach            |
adam@newsnipple.com       | http://youlook.org
http://www.newsnipple.com |
'88 EX500    '00 >^<      |

Re: quota's ?

From
"Sander Steffann"
Date:
Hi,

> On Sat, Apr 07, 2001 at 01:46:48PM -0400, Doug McNaught wrote:
> > Peter Eisentraut <peter_e@gmx.net> writes:
> >
> > > Doug McNaught writes:
> > >
> > > > Doing this would almost certainly result in a corrupted database
once
> > > > you ran up against the limit.
> > >
> > > I think you can give PostgreSQL a little more credit than that.  ;-)
> >
> > I'm very glad to hear it.  A lot of applications don't cope with
> > filesystem-full/quota-exceeded very well at all.  ;)
>
> I've not been following postgres-hackers as closely as I should, but
> as of the first betas of 7.1, it would corrupt your database horribly
> if you ran out of space.
>
> I think this has been fixed, but you might wanna check with hackers or
> release nots.

Just to make sure: what DOES happen if PostgreSQL runs out of space?

Sander.



Re: quota's ?

From
Joseph Shraibman
Date:
Sander Steffann wrote:
>
> Hi,
>
> > On Sat, Apr 07, 2001 at 01:46:48PM -0400, Doug McNaught wrote:
> > > Peter Eisentraut <peter_e@gmx.net> writes:
> > >
> > > > Doug McNaught writes:
> > > >
> > > > > Doing this would almost certainly result in a corrupted database
> once
> > > > > you ran up against the limit.
> > > >
> > > > I think you can give PostgreSQL a little more credit than that.  ;-)
> > >
> > > I'm very glad to hear it.  A lot of applications don't cope with
> > > filesystem-full/quota-exceeded very well at all.  ;)
> >
> > I've not been following postgres-hackers as closely as I should, but
> > as of the first betas of 7.1, it would corrupt your database horribly
> > if you ran out of space.
> >
> > I think this has been fixed, but you might wanna check with hackers or
> > release nots.
>
> Just to make sure: what DOES happen if PostgreSQL runs out of space?
>
I've had it happen to me recently.  I saw an error message in the
postgres log about the filesystem being full.  I got rid of some file
and postgres just went on working, I didn't have to restart it or
anything.  That was 7.0.3

--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com