Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BAEAE475C98 for ; Thu, 5 Dec 2002 04:28:04 -0500 (EST) Received: from egwn.net (auth02.nl.egwn.net [193.172.5.4]) by postgresql.org (Postfix) with ESMTP id 2E4BC475BC3 for ; Thu, 5 Dec 2002 04:28:03 -0500 (EST) Received: from fibers.upc.es (gw01.es3.egwn.net [212.9.66.13]) (authenticated) by egwn.net (8.11.6/8.11.6/EGWN) with ESMTP id gB59Rko29501; Thu, 5 Dec 2002 10:27:47 +0100 Message-ID: <3DEF1C14.2000008@fibers.upc.es> Date: Thu, 05 Dec 2002 10:27:48 +0100 From: Thrasher Organization: =?ISO-8859-1?Q?Delegaci=F3_Alumnes_FIB?= User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1b) Gecko/20020721 X-Accept-Language: es, es-es, en-us MIME-Version: 1.0 To: "Berman, Phil" Cc: pgsql-sql@postgresql.org Subject: Re: Backend message type 0x50 arrived while idle References: <99407664A0A7D511AD9900508BB0FB0301D1AEA6@XCGVA030> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/64 X-Sequence-Number: 10652 Hi Phil It also happened to me last week. I found the problem is that you cannot share the same connection among processes unless you implement some kind of locking (semaphores, ...). More clearly, I had this problem. Query QA lasts 5 seconds to perform, and returns answer AA. Query QB lasts 10 seconds and returns AB. B is a child process of A. I launch the parent A. Performs QA. Waits for answer. I launch the child B. Performs QB. Waits for answer. Server returns AA, but it gets caught by B !! So, solutions are: - You open a new backend connection for each process. - You make each process lock before sending QA, and unlock when receiving AA. Hope it helps !! Thrasher Berman, Phil wrote: > To all- > I am using Postgres version 6.5.1 in a multithreaded program which is > written in C. All inserts and updates into any tables are done within the > child process, and there are retrieves from tables both in the parent and > child processes. Additionally, the child process will insert into and > update a table, and the parent process will retrieve from the same table. > There are loops in both the parent and child processes, so every postgres > call may be made multiple times, with a significant amount of time (seconds > or minutes) between calls. Invariably, I get a message "backend message > type 0x50 arrived while idle" before the process completes, although the > point where I get this message can vary somewhat. Can anyone tell me what > this message means, why I am getting it, and/or how to avoid getting it in > the future? > > Thanks in advance, > Phil > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >