Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D88E62E0055 for ; Tue, 20 May 2008 14:38:45 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 44820-05 for ; Tue, 20 May 2008 14:38:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by developer.postgresql.org (Postfix) with ESMTP id 121182E0054 for ; Tue, 20 May 2008 14:38:39 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id n4so2459691wag.5 for ; Tue, 20 May 2008 10:38:38 -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:content-transfer-encoding:content-disposition:references; bh=bF8Zz0sh0qx/dlh0LWI3GvmBPdpa7IBh19nVHHGSbOA=; b=Y1ykMxtOSjo2lR3Vkh1+UuYFlSPjCZOXAjXA0JqcYbX2P/61eDP6aZeL5goPVVZ/YX1k/lD1s1RwGrT1C+iROOwFIDkDd0HMUZGZtBenGX/6FjXSz9tX2pckd2OvJtADIhZ9DiEipNUw5dYv/9UQ16mDidFcQ1J9huz8X5oEBkg= 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:content-transfer-encoding:content-disposition:references; b=wENLzrWbnjPYV0/5V3Ztip9qmGaLjrZ/f39gYBdaNBZaJqkPmqI6r2nZsDqVpJtbyHuGBg4IIxX2rbu8B5jmmc1JllPXhunFGsqKCKd/OYgW6C9shU0pFX0yp+H4gT6Xe/9oJ/Y46gt2CXnxZ/y2fkh1jkqLmcRkGoQ84zfUHkw= Received: by 10.114.178.1 with SMTP id a1mr9164794waf.25.1211305118339; Tue, 20 May 2008 10:38:38 -0700 (PDT) Received: by 10.114.137.7 with HTTP; Tue, 20 May 2008 10:38:38 -0700 (PDT) Message-ID: Date: Tue, 20 May 2008 11:38:38 -0600 From: "Scott Marlowe" To: "pronix pronix" Subject: Re: how i can restrict databaseusers ? Cc: pgsql-admin@postgresql.org In-Reply-To: <639ce0480805200657l82cd49coe381814a2d86c655@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <639ce0480805200657l82cd49coe381814a2d86c655@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/172 X-Sequence-Number: 29256 On Tue, May 20, 2008 at 7:57 AM, pronix pronix wrote: > hello > how i can restrict dbusers ( user's db size, cpu time)? > how i can monitoring this parameters You can create table spaces for each user, and then create a db or schema or whatnot in that tablespace. If each tablespace is on a partition that is limited to some size, then you've limited the user's space. You don't get the more fine grained quotas that dbs like Oracle provide, but then again, since you're not spending $250,000 a year licensing postgresql, I guess you can buy a lot more space for the users to play in if they all share the same db. As for CPU time, there's really not restriction by user capability in postgresql at this time. To monitor it you can turn on stats collection and track what statements are using up the most CPU by pid.