X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BEC019FA5DC for ; Tue, 30 May 2006 13:04:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 34494-01 for ; Tue, 30 May 2006 13:04:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 4CCE49FA4DE for ; Tue, 30 May 2006 13:04:37 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so577430ugf for ; Tue, 30 May 2006 09:04:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=GTYswtHz/nQ10oWltC8NfjQJ6QOipbvkNmeyh2WVwQVEZjpsJ5Lm8ah5y/MWoYWZHFDd8JJhtCmGkUAsjwviGjU3PN1wdcMWqrWub6MtRTlZfkpUG4McL8K5IKOfD321etUEgpRT20TuKahKI4aqpZ3bn4iZXIkfbjHZMYD7NEk= Received: by 10.67.124.1 with SMTP id b1mr2895103ugn; Tue, 30 May 2006 09:04:03 -0700 (PDT) Received: by 10.67.20.12 with HTTP; Tue, 30 May 2006 09:04:03 -0700 (PDT) Message-ID: Date: Tue, 30 May 2006 11:04:03 -0500 From: "Aaron Bono" To: andy.shellam@mailnetwork.co.uk Subject: Re: Separating Databases on Different Partitions Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14648_6252879.1149005043518" References: X-Google-Sender-Auth: eda00d7ddc4decf7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/418 X-Sequence-Number: 21950 ------=_Part_14648_6252879.1149005043518 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I think the tablespace option will work best - I will check it out. I do not give the users control of the database since I do the development, I just need a way to allocate the space and charge for space used. Since cPanel monitors user space, I don't want to rely on having to query the database to get size information - I would have to put together separate scripts to watch space usage which I would rather not do. Thanks for the help! -Aaron On 5/30/06, Andy Shellam wrote: > > Hi Aaron > > > > I believe you could probably do this best with table spaces. You'll have > to look it up in the documentation as I haven't done it for a while. > > You symlink a directory under /pg_tblspc to another physical > directory (eg. Your user's home/db directory), then when you create the > database, set its default table space to which directory you create. > > > > There is a downside in that the user could create a new table and override > the table space to that of another user. > > > > You could always query the system catalogues for the usage for each user's > database and add that to the physical size of their home directory? > > > > Regards, > > > > Andy > ------=_Part_14648_6252879.1149005043518 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think the tablespace option will work best - I will check it out.  I do not give the users control of the database since I do the development, I just need a way to allocate the space and charge for space used.  Since cPanel monitors user space, I don't want to rely on having to query the database to get size information - I would have to put together separate scripts to watch space usage which I would rather not do.

Thanks for the help!

-Aaron

On 5/30/06, Andy Shellam <andy.shellam@mailnetwork.co.uk > wrote:

Hi Aaron

 

I believe you could probably do this best with table spaces.  You'll have to look it up in the documentation as I haven't done it for a while.

You symlink a directory under <pgdata>/pg_tblspc to another physical directory (eg. Your user's home/db directory), then when you create the database, set its default table space to which directory you create.

 

There is a downside in that the user could create a new table and override the table space to that of another user.

 

You could always query the system catalogues for the usage for each user's database and add that to the physical size of their home directory?

 

Regards,

 

Andy


------=_Part_14648_6252879.1149005043518--