X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CC4073A3D40 for ; Mon, 8 Nov 2004 01:13:57 +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 56094-10 for ; Mon, 8 Nov 2004 01:13:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id BFAD13A3B81 for ; Mon, 8 Nov 2004 01:13:48 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iA81DjXU025494; Sun, 7 Nov 2004 20:13:45 -0500 (EST) To: =?iso-8859-1?Q?Einar_M=E1r_Bj=F6rvinsson?= Cc: pgsql-general@postgresql.org Subject: Re: In-reply-to: References: Comments: In-reply-to =?iso-8859-1?Q?Einar_M=E1r_Bj=F6rvinsson?= message dated "Tue, 02 Nov 2004 09:00:58 +0000" Date: Sun, 07 Nov 2004 20:13:45 -0500 Message-ID: <25493.1099876425@sss.pgh.pa.us> From: Tom Lane 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/285 X-Sequence-Number: 68365 =?iso-8859-1?Q?Einar_M=E1r_Bj=F6rvinsson?= writes: > The program starts by opening a connection to the database, enter the = > infinite while loop to run some functions.=20 > Inside the while loop it forks many childs which then call one function = > from the library I made. Are you trying to say that you are opening a database connection in the parent process and passing it down for the children to play around with? This is a fairly bad idea, unless you have an interlock mechanism to ensure that only one child uses it at a time. > It is as if the handle to the connection is not valid any more.=20 Perhaps the child is closing the connection when it's done with it. regards, tom lane