From dev_hyd2001@yahoo.com Thu Jul 3 16:10:34 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5C5FA650F23 for ; Thu, 3 Jul 2008 13:10:34 -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 36999-03-2 for ; Thu, 3 Jul 2008 13:10:29 -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 94E89650FAC for ; Thu, 3 Jul 2008 13:07:24 -0300 (ADT) Received: (qmail 43778 invoked by uid 60001); 3 Jul 2008 16:07:23 -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:MIME-Version:Content-Type:Message-ID; b=bcwilWONdnOsypDPhbCjRtMVc+9DlKA+qH8IDew6eG7dvCVn12NbBTkFvKDaQW3NAxcYbV9KdHjQHqUsSNWb2GTdGi1LzxD0zIraw50gUJx6/hoitgKXTxjSXpCbg6CHnoW5ju3UUDpFB9bhpSUevkY4m5VPrxaNXOEuDVSQ2yU=; Received: from [82.182.120.68] by web53708.mail.re2.yahoo.com via HTTP; Thu, 03 Jul 2008 09:07:23 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Thu, 3 Jul 2008 09:07:23 -0700 (PDT) From: Dev Reply-To: dev_hyd2001@yahoo.com Subject: Best way to limit database sizes To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-898083684-1215101243=:42270" Message-ID: <619537.42270.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/42 X-Sequence-Number: 29652 --0-898083684-1215101243=:42270 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi, =A0=A0=A0=A0=A0=A0=A0 I have a single Postgres server which will be hosting= multiple databases belonging to different users. What would be the recomme= ndation to limit the size of each of the databases?=20 I've considered creating a tablespace 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 postgres user an= d so disk quotas won't have any effect. Now I'm contemplating having a cron job which checks the size of each table= space belonging to a user and somehow informing the admin about db's gettin= g over the threshold size. Is there anyone who has tried a better=A0 way to limit the db sizes ? cheers /Dev =0A=0A=0A --0-898083684-1215101243=:42270 Content-Type: text/html; charset=us-ascii
Hi,

        I have a single Postgres server which will be hosting multiple databases belonging to different users. What would be the recommendation to limit the size of each of the databases?

I've considered creating a tablespace 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 postgres user and so disk quotas won't have any effect.

Now I'm contemplating having a cron job which checks the size of each tablespace belonging to a user and somehow informing the admin about db's getting over the threshold size.

Is there anyone who has tried a better  way to limit the db sizes ?

cheers

/Dev

--0-898083684-1215101243=:42270-- From Kevin.Grittner@wicourts.gov Thu Jul 3 16:29:26 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4AFDA650EDD for ; Thu, 3 Jul 2008 13:29:26 -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 55572-07-3 for ; Thu, 3 Jul 2008 13:29:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 71D80650EBC for ; Thu, 3 Jul 2008 13:28:27 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 03 Jul 2008 11:28:25 -0500 Message-Id: <486CB7E4.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Thu, 03 Jul 2008 11:28:17 -0500 From: "Kevin Grittner" To: , Subject: Re: Best way to limit database sizes References: <619537.42270.qm@web53708.mail.re2.yahoo.com> In-Reply-To: <619537.42270.qm@web53708.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/43 X-Sequence-Number: 29653 >>> Dev wrote: > I have a single Postgres server which will be hosting multiple > databases belonging to different users. What would be the recommendation to > limit the size of each of the databases? Have you considered running a different cluster for each user? Each should be run with a different OS user ID, and it would be pretty easy to limit the size of each. -Kevin From dev_hyd2001@yahoo.com Thu Jul 3 17:48:14 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AEEAA650E8F for ; Thu, 3 Jul 2008 14:48:14 -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 29206-01 for ; Thu, 3 Jul 2008 14:48:02 -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 AAE37650E87 for ; Thu, 3 Jul 2008 14:48:03 -0300 (ADT) Received: (qmail 21236 invoked by uid 60001); 3 Jul 2008 17:48:01 -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=G0WBEzopDOCbtV5Oa2bWPvoXAELcpUiLGQyQrtZLyaCAx3bHxlMQmK+E7fPQ8jOHu2sAC/d5Ae8bHtwoph9IMx3y1Uq7k9suR/2WnkmU2bCixY5DuYQGLDHcQ1QzZr58SRIEH6oufDUF2C88JjRow38gpOmXGS7/1nW9QRSu5Yg=; Received: from [83.249.198.89] by web53708.mail.re2.yahoo.com via HTTP; Thu, 03 Jul 2008 10:48:01 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Thu, 3 Jul 2008 10:48:01 -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: <486CB7E4.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1889021544-1215107281=:20954" Message-ID: <869366.20954.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/44 X-Sequence-Number: 29654 --0-1889021544-1215107281=:20954 Content-Type: text/plain; charset=us-ascii yes, thats an option but currently the last resort! Doesn't it get difficult to manage so many instances of servers ? Also don't we then need to keep track of different port numbers for each user/group ? /Dev --- On Thu, 7/3/08, Kevin Grittner wrote: From: Kevin Grittner Subject: Re: [ADMIN] Best way to limit database sizes To: pgsql-admin@postgresql.org, dev_hyd2001@yahoo.com Date: Thursday, July 3, 2008, 6:28 PM >>> Dev wrote: > I have a single Postgres server which will be hosting multiple > databases belonging to different users. What would be the recommendation to > limit the size of each of the databases? Have you considered running a different cluster for each user? Each should be run with a different OS user ID, and it would be pretty easy to limit the size of each. -Kevin --0-1889021544-1215107281=:20954 Content-Type: text/html; charset=us-ascii
yes, thats an option but currently the last resort! Doesn't it get difficult to manage so many instances of servers ? Also don't we then need to keep track of different port numbers for each user/group ?

/Dev


--- On Thu, 7/3/08, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Subject: Re: [ADMIN] Best way to limit database sizes
To: pgsql-admin@postgresql.org, dev_hyd2001@yahoo.com
Date: Thursday, July 3, 2008, 6:28 PM

>>> Dev <dev_hyd2001@yahoo.com> wrote: 
> I have a single Postgres server which will be hosting
multiple
> databases belonging to different users. What would be the
recommendation to
> limit the size of each of the databases?

Have you considered running a different cluster for each user?
Each should be run with a different OS user ID, and it would be
pretty easy to limit the size of each.

-Kevin

--0-1889021544-1215107281=:20954-- From montaseri@gmail.com Thu Jul 3 18:31:48 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3C768650E82 for ; Thu, 3 Jul 2008 15:31:48 -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 76369-06 for ; Thu, 3 Jul 2008 15:31:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by postgresql.org (Postfix) with ESMTP id D35EA64FD64 for ; Thu, 3 Jul 2008 15:31:43 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id d30so204705and.33 for ; Thu, 03 Jul 2008 11:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=qQkpHnlMQXmT4PFLXkp+FQk0JFqCV5a8qFx5YN/vJZQ=; b=jcqIUH8JUvfxDjRwJVJEkrQWQ37UXEbuvP7h5bFb/APndf7w1e3Jk1mAqSeUCs5RCv /+iuJa2Synxyco2ATk0p/yToywX7SKY/M/K7xbL0UEOmaj9P42hr9jN5k+kSZRuSHAvq B2RN7v82Coo1JqVMMTaitYKAHAZKF+9GRcg5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=hv7TAcSIH3OTy2diWQ+tvqTof6JOKkBHRzVtyrCPKC2WDJoZBzdvV7+vhnq26NHK3N EfY/r9U6y46qfMR7zGgIJjqdllwwVMlc/QpfFKOwpcM2qNlN0rvHng0XMh7thBPU8xLQ fY74abk+w/zEykm7Q4DB7548jisUv8KmlZjhA= Received: by 10.100.46.10 with SMTP id t10mr74708ant.22.1215109902095; Thu, 03 Jul 2008 11:31:42 -0700 (PDT) Received: by 10.100.190.19 with HTTP; Thu, 3 Jul 2008 11:31:41 -0700 (PDT) Message-ID: <8078a1730807031131i79bea3ffpdaa03233afac7c57@mail.gmail.com> Date: Thu, 3 Jul 2008 11:31:41 -0700 From: Montaseri To: dev_hyd2001@yahoo.com Subject: Re: Best way to limit database sizes Cc: pgsql-admin@postgresql.org In-Reply-To: <869366.20954.qm@web53708.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10538_12690975.1215109902047" References: <486CB7E4.EE98.0025.0@wicourts.gov> <869366.20954.qm@web53708.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/45 X-Sequence-Number: 29655 ------=_Part_10538_12690975.1215109902047 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline How about a trigger that for every say 1000 or 10000 update or inserts (or timely if cron job) will use pg_stats or pg_statistics to decide if a role (user) privileges should be modified to read only (or not) Cheers Medi On Thu, Jul 3, 2008 at 10:48 AM, Dev wrote: > yes, thats an option but currently the last resort! Doesn't it get > difficult to manage so many instances of servers ? Also don't we then need > to keep track of different port numbers for each user/group ? > > /Dev > > > --- On *Thu, 7/3/08, Kevin Grittner * wrote: > > From: Kevin Grittner > Subject: Re: [ADMIN] Best way to limit database sizes > To: pgsql-admin@postgresql.org, dev_hyd2001@yahoo.com > Date: Thursday, July 3, 2008, 6:28 PM > > >>> Dev wrote: > > I have a single Postgres server which will be hosting > multiple > > databases belonging to different users. What would be the > recommendation to > > > limit the size of each of the databases? > > Have you considered running a different cluster for each user? > Each should be run with a different OS user ID, and it would be > pretty easy to limit the size of each. > > -Kevin > > > ------=_Part_10538_12690975.1215109902047 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline How about a trigger that for every say 1000 or 10000 update or inserts (or timely if cron job) will use pg_stats or pg_statistics to decide if a role (user) privileges should be modified to read only (or not)

Cheers
Medi

On Thu, Jul 3, 2008 at 10:48 AM, Dev <dev_hyd2001@yahoo.com> wrote:
yes, thats an option but currently the last resort! Doesn't it get difficult to manage so many instances of servers ? Also don't we then need to keep track of different port numbers for each user/group ?

/Dev


--- On Thu, 7/3/08, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Subject: Re: [ADMIN] Best way to limit database sizes
To: pgsql-admin@postgresql.org, dev_hyd2001@yahoo.com
Date: Thursday, July 3, 2008, 6:28 PM


>>> Dev <dev_hyd2001@yahoo.com> wrote: 
> I have a single Postgres server which will be hosting
multiple
> databases belonging to different users. What would be the
recommendation to
> limit the size of each of the databases?

Have you considered running a different cluster for each user?
Each should be run with a different OS user ID, and it would be
pretty easy to limit the size of each.

-Kevin


------=_Part_10538_12690975.1215109902047-- From Kevin.Grittner@wicourts.gov Thu Jul 3 18:32:26 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 85C5A650ED3 for ; Thu, 3 Jul 2008 15:32:26 -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 76677-04 for ; Thu, 3 Jul 2008 15:32:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 4AF74650EC2 for ; Thu, 3 Jul 2008 15:32:10 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 03 Jul 2008 13:32:02 -0500 Message-Id: <486CD4D7.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Thu, 03 Jul 2008 13:31:47 -0500 From: "Kevin Grittner" To: , Subject: Re: Best way to limit database sizes References: <486CB7E4.EE98.0025.0@wicourts.gov> <869366.20954.qm@web53708.mail.re2.yahoo.com> In-Reply-To: <869366.20954.qm@web53708.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/46 X-Sequence-Number: 29656 >>> Dev wrote: > --- On Thu, 7/3/08, Kevin Grittner wrote: >> Have you considered running a different cluster for each user? > Doesn't it get difficult to manage so many instances of servers ? We haven't found it to be so. xargs is your friend, fed by find or cat. > Also don't we then need to keep > track of different port numbers for each user/group ? Yes. -Kevin From dfontaine@hi-media.com Thu Jul 3 19:10:59 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2C718650E9E for ; Thu, 3 Jul 2008 16:10:59 -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 14057-03 for ; Thu, 3 Jul 2008 16:10:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.texom.com (sd-6100.dedibox.fr [88.191.35.50]) by postgresql.org (Postfix) with ESMTP id 4A2E0650E8F for ; Thu, 3 Jul 2008 16:10:53 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.texom.com (Postfix) with ESMTP id B845C94033; Thu, 3 Jul 2008 21:10:50 +0200 (CEST) Received: from mail.texom.com ([127.0.0.1]) by localhost (mail.texom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18932-10; Thu, 3 Jul 2008 21:10:49 +0200 (CEST) Received: from [192.168.12.5] (cac94-7-82-243-27-82.fbx.proxad.net [82.243.27.82]) by mail.texom.com (Postfix) with ESMTP id A530D94006; Thu, 3 Jul 2008 21:10:49 +0200 (CEST) Cc: pgsql-admin@postgresql.org Message-Id: <08A677B0-4BE9-4F75-83F2-410DE6F360C3@hi-media.com> From: Dimitri Fontaine To: dev_hyd2001@yahoo.com In-Reply-To: <619537.42270.qm@web53708.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: Best way to limit database sizes Date: Thu, 3 Jul 2008 21:10:47 +0200 References: <619537.42270.qm@web53708.mail.re2.yahoo.com> X-Pgp-Agent: GPGMail d52 (v52, Leopard) X-Mailer: Apple Mail (2.926) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at texom.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/47 X-Sequence-Number: 29657 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Le 3 juil. 08 =E0 18:07, Dev a =E9crit : > 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. What if you put each tablespace on a LVM partition of a control sized, =20= extensible? - -- dim -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkhtJDcACgkQlBXRlnbh1bkQlACfY825U1pq7Livch4sPSEgj1x6 iCMAoMN9Wjxb3KFOHbOmj2oi5sqnvyUn =3DIeBI -----END PGP SIGNATURE----- From postgresql@tisc.de Thu Jul 3 19:18:40 2008 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8F5F0650EBF for ; Thu, 3 Jul 2008 16:18:40 -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 22656-01-2 for ; Thu, 3 Jul 2008 16:18:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from easy2.in-chemnitz.de (easy2.in-chemnitz.de [88.198.17.232]) by postgresql.org (Postfix) with ESMTP id B8CD5650F5C for ; Thu, 3 Jul 2008 16:17:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by easy2.in-chemnitz.de (Postfix) with ESMTP id 708E647001B for ; Thu, 3 Jul 2008 21:17:36 +0200 (CEST) Received: from easy2.in-chemnitz.de ([127.0.0.1]) by localhost (easy.in-chemnitz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wd4zcXqO61Gw for ; Thu, 3 Jul 2008 21:17:36 +0200 (CEST) Received: by easy2.in-chemnitz.de (Postfix, from userid 1013) id 5ED25470012; Thu, 3 Jul 2008 21:17:36 +0200 (CEST) Date: Thu, 3 Jul 2008 21:17:36 +0200 From: Tino Schwarze To: pgsql-admin@postgresql.org Subject: Re: Best way to limit database sizes Message-ID: <20080703191736.GB24555@easy2.in-chemnitz.de> References: <619537.42270.qm@web53708.mail.re2.yahoo.com> <08A677B0-4BE9-4F75-83F2-410DE6F360C3@hi-media.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <08A677B0-4BE9-4F75-83F2-410DE6F360C3@hi-media.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/48 X-Sequence-Number: 29658 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 > >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 postgres user and so disk quotas won't have any effect. > > What if you put each tablespace on a LVM partition of a control sized, > 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.) -- "What we nourish flourishes." - "Was wir nähren erblüht." www.craniosacralzentrum.de www.forteego.de From dev_hyd2001@yahoo.com Fri Jul 4 07:42:19 2008 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--