X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6BD09D1B55A for ; Fri, 31 Oct 2003 13:28:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 96521-02 for ; Fri, 31 Oct 2003 09:27:50 -0400 (AST) Received: from mail.tpi.pl (mail.tpi.pl [193.110.121.18]) by svr1.postgresql.org (Postfix) with ESMTP id 2C54DD1B93D for ; Fri, 31 Oct 2003 09:27:47 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.tpi.pl (Postfix) with ESMTP id 3F5734704B; Fri, 31 Oct 2003 14:27:49 +0100 (CET) Received: from mail.tpi.pl ([127.0.0.1]) by localhost (silver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20099-12; Fri, 31 Oct 2003 14:27:48 +0100 (CET) Received: from [10.5.3.38] (lan-out [193.110.121.17]) by mail.tpi.pl (Postfix) with ESMTP id 3306D46FCF; Fri, 31 Oct 2003 14:27:38 +0100 (CET) Subject: Re: performance problem - 10.000 databases From: Marek Florianczyk To: Jamie Lawrence Cc: Matt Clark , pgsql-admin@postgresql.org In-Reply-To: <20031031125433.GA10459@clueinc.net> References: <1067602452.22237.76.camel@franki-laptop.tpi.pl> <20031031125433.GA10459@clueinc.net> Content-Type: text/plain; charset=ISO-8859-2 Organization: Message-Id: <1067606409.22286.114.camel@franki-laptop.tpi.pl> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 31 Oct 2003 14:20:09 +0100 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at TP Internet X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/393 X-Sequence-Number: 10954 W li¶cie z pi±, 31-10-2003, godz. 13:54, Jamie Lawrence pisze: > On Fri, 31 Oct 2003, Matt Clark wrote: > > > I was more thinking that it might be possible to manage the security at a different level than the DB. > > > > > We do this with users and permissions. > > Each virtual host has an apache config include specifying a db user, > pass (and database, although most of them use the same one). > Permissions on the database tables are set so that a given vhost can > only access their own data. > > Our setup is mod_perl. Don't know how one would go about doing this with > PHP, but I imagine it has some mechanism for per-vhost variables or > similar. So, as I understand apache vhost can only connect to specified database. Strange... no PHP only mod_perl that fetch data from database and writes html document ? So, clients don't make any scripts, and don't use function like pgconnect? Do they use CGI with mod_perl, and they write scripts in perl ? Interesting. Don't know if it's possible with PHP, don't think so. But... If I would have 200, or even 900 clients I would do apache with vhost. But when I have 10.000 clients, apache cannot work with vhosts. ( some system limitation ) So we use our own dynamic vhost module. When request is made to server, it checks domain part of the request, and search i LDAP what is DocumentRoot for that domain, and then return proper file. Config looks like it was only one vhost, but it works with 10.000 domains ;) No, I think that your solution, would not work for us. Everything is complicated when a large number of anything occurs. ;) greetings sorry for my bad english