X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 34422474E5C for ; Mon, 10 Feb 2003 02:41:40 -0500 (EST) Received: from smtp-3.paradise.net.nz (smtp-3a.paradise.net.nz [202.0.32.196]) by postgresql.org (Postfix) with ESMTP id 95D6A474E53 for ; Mon, 10 Feb 2003 02:41:39 -0500 (EST) Received: from paradise.net.nz (202-0-44-18.adsl.paradise.net.nz [202.0.44.18]) by smtp-3.paradise.net.nz (Postfix) with ESMTP id 2AA32AE523 for ; Mon, 10 Feb 2003 20:41:39 +1300 (NZDT) Message-ID: <3E475747.1010009@paradise.net.nz> Date: Mon, 10 Feb 2003 20:39:51 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Re: Apache child processes making multiple persistent References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/22 X-Sequence-Number: 3643 Ben Borger wrote: > Hello, > > Is it normal for Apache child threads to be opening more than one > persistent > database connection to Postgres? DBI 1.19, Apache::DBI 0.88 > > > How I think it works is : Each connection to the db for a userid and an apache child results in a persistent connection. So if user1, user2 both get serviced by apache child 1, then it ends up with a persistent connection for each of them. How this problem is often circumvented is to authenticate externally, save credentials (or an id for them) in a cookie, and do all db work by means 1 synthetic database userid. best wishes Mark