X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 90A7F3A47DB for ; Thu, 4 Nov 2004 13:17:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49152-07 for ; Thu, 4 Nov 2004 13:17:20 +0000 (GMT) Received: from fep3.cogeco.net (smtp.cogeco.net [216.221.81.25]) by svr1.postgresql.org (Postfix) with ESMTP id DBBB33A477A for ; Thu, 4 Nov 2004 13:17:23 +0000 (GMT) Received: from [127.0.0.1] (d226-34-9.home.cgocable.net [24.226.34.9]) by fep3.cogeco.net (Postfix) with ESMTP id 02559F96; Thu, 4 Nov 2004 08:17:22 -0500 (EST) Message-ID: <418A2BE2.70609@ethereal-realms.org> Date: Thu, 04 Nov 2004 08:17:22 -0500 From: Martin Foster Organization: Ethereal Realms User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Simon Riggs , pgsql-performance@postgresql.org Subject: Re: Restricting Postgres References: <1099509684.4320.2.camel@localhost.localdomain> <41894CD9.8090308@ethereal-realms.org> <1099570740.4320.196.camel@localhost.localdomain> In-Reply-To: <1099570740.4320.196.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/42 X-Sequence-Number: 8996 Simon Riggs wrote > > > All workloads are not created equally, so mixing them can be tricky. > This will be better in 8.0 because seq scans don't spoil the cache. > > Apache is effectively able to segregate the workloads because each > workload is "in a directory". SQL isn't stored anywhere for PostgreSQL > to say "just those ones please", so defining which statements are in > which workload is the tricky part. > > PostgreSQL workload management could look at userid, tables, processor > load (?) and estimated cost to decide what to do. > > There is a TODO item on limiting numbers of connections per > userid/group, in addition to the max number of sessions per server. > > Perhaps the easiest way would be to have the Apache workloads segregated > by PostgreSQL userid, then limit connections to each. > Apache has a global setting for load average limits, the above was just a module which extended the capability. It might also make sense to have limitations set on schema's which can be used in a similar way to Apache directories. While for most people the database protecting itself against a sudden surge of high traffic would be undesirable. It can help those who run dynamically driven sites and get slammed by Slashdot for example. Martin Foster Creator/Designer Ethereal Realms martin@ethereal-realms.org