Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E3BE2650E93 for ; Fri, 4 Jul 2008 04:42:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06801-10 for ; Fri, 4 Jul 2008 04:42:12 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web53708.mail.re2.yahoo.com (web53708.mail.re2.yahoo.com [206.190.37.29]) by postgresql.org (Postfix) with SMTP id 444E764FD64 for ; Fri, 4 Jul 2008 04:42:14 -0300 (ADT) Received: (qmail 34533 invoked by uid 60001); 4 Jul 2008 07:42:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=SG0WyHTFWxiSEz4XTuEc9XeEs3/KZI7akia0fYbVJIzf8PxdCdsyFnjfBEODXUi3UQl+faxAEH4+2K4OFVPCGZjnN5xn/jc4qAYw9KZY51+BvfjukgdAxV/AeyPyiihtu1PvAvtfmuYgTj0xqpeAFvLOaWukMHm0UbUN7HK9RsI=; Received: from [82.182.120.68] by web53708.mail.re2.yahoo.com via HTTP; Fri, 04 Jul 2008 00:42:12 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Fri, 4 Jul 2008 00:42:12 -0700 (PDT) From: Dev Reply-To: dev_hyd2001@yahoo.com Subject: Re: Best way to limit database sizes To: pgsql-admin@postgresql.org In-Reply-To: <20080703191736.GB24555@easy2.in-chemnitz.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-940354931-1215157332=:34075" Message-ID: <21800.34075.qm@web53708.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/63 X-Sequence-Number: 29673 --0-940354931-1215157332=:34075 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanx for all the suggestions. I'm planning to go ahead with the trigger ap= proach and locking databases for writes when it goes over the threshold! Se= tting hard limits looks like a bad idea ! cheers /Dev --- On Thu, 7/3/08, Tino Schwarze wrote: From: Tino Schwarze Subject: Re: [ADMIN] Best way to limit database sizes To: pgsql-admin@postgresql.org Date: Thursday, July 3, 2008, 9:17 PM On Thu, Jul 03, 2008 at 09:10:47PM +0200, Dimitri Fontaine wrote: > >I've considered creating a tablespace in a directory owned by the=20 > >user , so I can use Linux quotas to prevent higher disk usage , but =20 > >this turned out be a bad thought, as all the files are anyway owned =20 > >by the postgres user and so disk quotas won't have any effect. >=20 > What if you put each tablespace on a LVM partition of a control sized, = =20 > extensible? This is a desaster waiting to happen. I'd say never let a database get out of disk space. Rather implement soft limits like regular cron jobs and make them pay for overusage. Also note that DB size on disk and amount of data stored in DB might be a lot different because of bloating issues, indices etc. Tino..oO(But LVM/tablespace should work.) --=20 "What we nourish flourishes." - "Was wir n=E4hren erbl=FCht." www.craniosacralzentrum.de www.forteego.de --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin=0A=0A=0A --0-940354931-1215157332=:34075 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thanx for all the suggestions. I'm planning t= o go ahead with the trigger approach and locking databases for writes when = it goes over the threshold! Setting hard limits looks like a bad idea !
=
cheers

/Dev


--- On Thu, 7/3/08, Tino Schwarze &= lt;postgresql@tisc.de> wrote:
From: = Tino Schwarze <postgresql@tisc.de>
Subject: Re: [ADMIN] Best way t= o limit database sizes
To: pgsql-admin@postgresql.org
Date: Thursday,= July 3, 2008, 9:17 PM

On Thu, Jul 03, 2008 at 09:10:47PM +0200=
, Dimitri Fontaine wrote:

> >I've considered creating a tables= pace in a directory owned by the

> >user , so I can use Linux= quotas to prevent higher disk usage , but
> >this turned out be= a bad thought, as all the files are anyway owned
> >by the postgr= es user and so disk quotas won't have any effect.
>
> What if = you put each tablespace on a LVM partition of a control sized,
> ex= tensible?

This is a desaster waiting to happen. I'd say never let a = database get
out of disk space. Rather implement soft limits like regula= r cron jobs
and make them pay for overusage.

Also note that DB si= ze on disk and amount of data stored in DB might be
a lot different beca= use of bloating issues, indices etc.

Tino..oO(But LVM/tablespace sho= uld work.)

--
"What we nourish flourishes." - "Was wir n=E4hren = erbl=FCht."

www.craniosacralzentrum.de
www.forteego.de

-- =
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To ma= ke changes to your subscription:
http://www.postgresql.org/mailpref/pgsq= l-admin

=0A=0A --0-940354931-1215157332=:34075--