Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5D243133729E for ; Sun, 17 Oct 2010 08:02:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 10064-08 for ; Sun, 17 Oct 2010 11:02:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc1-s18.bay0.hotmail.com (bay0-omc1-s18.bay0.hotmail.com [65.54.190.29]) by mail.postgresql.org (Postfix) with ESMTP id 0CCA11337990 for ; Sun, 17 Oct 2010 08:02:23 -0300 (ADT) Received: from BAY149-W53 ([65.54.190.61]) by bay0-omc1-s18.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 17 Oct 2010 04:02:23 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_7be86805-4901-4bc3-a194-a9c95334fc12_" X-Originating-IP: [94.13.3.237] From: Kieren Scott To: Subject: Restricting schema sizes Date: Sun, 17 Oct 2010 11:02:23 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 17 Oct 2010 11:02:23.0437 (UTC) FILETIME=[C6BEF7D0:01CB6DEA] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/140 X-Sequence-Number: 35881 --_7be86805-4901-4bc3-a194-a9c95334fc12_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C What is the best way to restrict/limit the size that a schema can grow too = in Postgresql? If I want to have a scratchpad area within my database to allow users to cr= eate tables=2C=20 how can I control the size of the objects they can create? Would I have to create a dedicated filesystem and then create a tablespace = on that=20 filesystem. Users could then create objects in that tablespace until they f= ill the filesystem. Is there a setting in Postgresql whereby I can allocate a quota of space wi= thin a=20 tablespace for each schema? The other option I can think of is writing a script that monitors the size = of the objects=20 within a schema. The danger here is that a user could potentially create a = huge table=20 as a result of a bad query (cartesian join etc) and fill the application ta= blespace / filesystem. Many thanks. = --_7be86805-4901-4bc3-a194-a9c95334fc12_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C

What is the best way to restrict/limit the size that a schema = can grow too in Postgresql?

If I want to have a scratchpad area with= in my database to allow users to create tables=2C
how can I control the= size of the objects they can create?

Would I have to create a dedic= ated filesystem and then create a tablespace on that
filesystem. Users = could then create objects in that tablespace until they fill the filesystem= .

Is there a setting in Postgresql whereby I can allocate a quota of= space within a
tablespace for each schema?

The other option I c= an think of is writing a script that monitors the size of the objects
w= ithin a schema. The danger here is that a user could potentially create a h= uge table
as a result of a bad query (cartesian join etc) and fill the = application tablespace / filesystem.

Many thanks.
= --_7be86805-4901-4bc3-a194-a9c95334fc12_--