quota's ?

Started by Kris Van Hulleabout 25 years ago9 messagesgeneral
Jump to latest
#1Kris 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 ?

Thnx.

Kris

#2Richard Huxton
dev@archonet.com
In reply to: Kris Van Hulle (#1)
Re: quota's ?

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

#3Doug McNaught
doug@wireboard.com
In reply to: Kris Van Hulle (#1)
Re: quota's ?

"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

#4Richard Huxton
dev@archonet.com
In reply to: Kris Van Hulle (#1)
Re: quota's ?

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

#5Doug McNaught
doug@wireboard.com
In reply to: Richard Huxton (#4)
Re: quota's ?

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

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Doug McNaught (#3)
Re: quota's ?

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/

#7Adam Haberlach
adam@newsnipple.com
In reply to: Doug McNaught (#5)
Re: quota's ?

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 >^< |

#8Sander Steffann
steffann@nederland.net
In reply to: Peter Eisentraut (#6)
Re: quota's ?

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.

#9Joseph Shraibman
jks@selectacast.net
In reply to: Peter Eisentraut (#6)
Re: quota's ?

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