X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 47A8A9FA60A; Tue, 20 Jun 2006 11:44:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 46023-07; Tue, 20 Jun 2006 11:44:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7171F9FA219; Tue, 20 Jun 2006 11:44:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5KEiVKI028010; Tue, 20 Jun 2006 10:44:31 -0400 (EDT) To: Geoffrey cc: pgsql-general@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] help with error message from perl Pg In-reply-to: <4497F919.7050203@3times25.net> References: <4497F919.7050203@3times25.net> Comments: In-reply-to Geoffrey message dated "Tue, 20 Jun 2006 09:33:13 -0400" Date: Tue, 20 Jun 2006 10:44:31 -0400 Message-ID: <28009.1150814671@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/803 X-Sequence-Number: 97175 Geoffrey writes: > ... Any subroutine that does a delete > or update runs fine, but the subsequent routine fails with the following > error: > prgcaphlg: FATAL: invalid frontend message type 78 > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > Searching google for 'invalid frontend message type 78' returns no hits, > which is a scary thing. 78 would be ASCII 'N', but that's not really significant AFAICS. The problem here is that the frontend and backend have lost sync: the server is expecting to find a message beginning at a place in the frontend data stream that evidently isn't the start of a message. In short, the frontend has sent corrupted data of some sort. Martijn's theory of inadequately locked threaded access is certainly one likely way this can happen, but it's not the only one. It might be useful for you to capture the data stream (with something like tcpdump) and try to get more information about the nature of the corruption. Frequently, if you can identify "ah-hah, THIS data is being inserted into the middle of THAT" or whatever, the cause becomes obvious. Also, before you spend too much time on this, make sure your DBI and DBD::Pg modules are up-to-date. If it's a bug in that level, it'd be foolish to waste much of your own time chasing it. regards, tom lane