From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Mike Goldner <mgoldner@agmednet.com>
To: Nikola Radakovic <achillea@hi.t-com.hr>
Cc: pgsql-admin@postgresql.org
Subject: Re: Database size
Date: Mon, 6 Nov 2006 15:00:04 -0800 (PST)
Message-ID: <20061106230004.3938.qmail@web31806.mail.mud.yahoo.com> (raw)
In-Reply-To: <1162853096.5202.50.camel@localhost.localdomain>
> Assuming that you are running Postgres on a linux system, you could do
> the following:
>
> 1) Create a partition with quotas enabled (via standard linux OS
> procedures). The postgres user is the user for which quotas should be
> enforced since postgresql always runs under the postgres uid.
>
> 2) Create a postgres tablespace using the newly created partition:
>
> psql> CREATE TABLESPACE dbspace LOCATION '/data/dbs';
>
> 3) Create the database on that tablespace:
>
> psql> CREATE DATABASE sales OWNER salesapp TABLESPACE dbspace;
>
> I have not tried this myself.
>
> As a side note, I'd say that limiting the size of a database to an
> arbitrary amount is problematic. Should a user actually exhaust the
> disk quota, Postgres will be unable to commit the transaction.
> Furthermore, it is difficult to recover from such a situation without
> major effort.
These links supplement the above comments:
http://www.postgresql.org/docs/8.1/interactive/disk-full.htmlhttp://www.postgresql.org/docs/8.1/interactive/manage-ag-tablespaces.html
Regards,
Richard Broersma Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: rabroersma@yahoo.com, mgoldner@agmednet.com, achillea@hi.t-com.hr
Subject: Re: Database size
In-Reply-To: <20061106230004.3938.qmail@web31806.mail.mud.yahoo.com>
References: <1162853096.5202.50.camel@localhost.localdomain> <20061106230004.3938.qmail@web31806.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox