Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 44D799FA1A2 for ; Mon, 8 Oct 2007 14:12:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 88767-05 for ; Mon, 8 Oct 2007 14:12:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from svr2.hagander.net (svr2.hagander.net [88.198.128.226]) by postgresql.org (Postfix) with ESMTP id A9A059FA0E8 for ; Mon, 8 Oct 2007 14:12:36 -0300 (ADT) Received: from dynamic.hagander.net ([127.0.0.1]) (encrypted and authenticated) by svr2.hagander.net (Postfix) with ESMTP id 35905DCC8AE; Mon, 8 Oct 2007 19:12:34 +0200 (CEST) Message-ID: <470A64F7.2090106@hagander.net> Date: Mon, 08 Oct 2007 19:12:23 +0200 From: Magnus Hagander User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Tino Wildenhain CC: Jeff@PointHere.net, "'D'Arcy J.M. Cain'" , pgsql-performance@postgresql.org Subject: Re: Apache2 PostgreSQL http authentication References: <200710080812110000@463712056> <470A645C.1080405@wildenhain.de> In-Reply-To: <470A645C.1080405@wildenhain.de> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/82 X-Sequence-Number: 27104 Tino Wildenhain wrote: > Magnus Hagander schrieb: >> I'd consider having a small daemon LISTENing for NOTIFYs that you send >> by triggers whenever the table has changed. That'll make sure it only >> dumps if something actually changed. And you can also implement some >> ratelimiting if needed. > Do you really think such a homegrown solution will be more > performant then just accessing postgres? If you have > many users the lookup time in a .htaccess/.htpasswd is not for > free either. Right, that's what it depends on. I'd measure it. In systems with not too many users (say just a couple of thousand), I've measured great improvements in speed. It depends on how you authenticate as well - if you authenticate every single http request, the difference is greater. //Magnus