Re: Database size

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Mike Goldner <mgoldner(at)agmednet(dot)com>, Nikola Radakovic <achillea(at)hi(dot)t-com(dot)hr>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database size
Date: 2006-11-06 23:00:04
Message-ID: 20061106230004.3938.qmail@web31806.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> 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.html
http://www.postgresql.org/docs/8.1/interactive/manage-ag-tablespaces.html

Regards,

Richard Broersma Jr.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tomeh, Husam 2006-11-07 01:06:58 Re: I have a question about Database management
Previous Message Mike Goldner 2006-11-06 22:44:56 Re: Database size