Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 286ED634B46 for ; Thu, 27 May 2010 16:29:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 08768-06 for ; Thu, 27 May 2010 19:29:08 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id BB9506322DE for ; Thu, 27 May 2010 16:29:01 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id o4RJSlK6031458 for ; Thu, 27 May 2010 16:28:58 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id o4N0Se54047175 for pgsql-jdbc@postgresql.org; Sat, 22 May 2010 21:28:40 -0300 (ADT) (envelope-from news) From: Lew X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: After server restart I get - An I/O error occured while sending to the backend. Date: Sat, 22 May 2010 20:29:03 -0400 Organization: albasani.net Lines: 14 Message-ID: References: <4BF27D11.8020001@postnewspapers.com.au> <4BF7AA8C.8080008@postnewspapers.com.au> <4BF85F34.90201@criticalpath.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@albasani.net X-User-ID: TlKFC4U4ObvlQ0YJl7i1JQopG3Kw7mrjiPcBPLKLbGA= In-Reply-To: <4BF85F34.90201@criticalpath.net> Cancel-Lock: sha1:H0R2o89Iq3KJR5h4bIajSMEr4oM= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 X-NNTP-Posting-Host: eAcgVE+tCCLsSiem7+CDoIofRPcEg3HeASIxT81Aj4c= To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/78 X-Sequence-Number: 20562 Daniele Depetrini wrote: > I've written a wrapper that use[s] the "setTransationIsolation" method as > first operation against a just[-]obtained connection to implicitly check > if it is still alive. And what if the connection dies just after you've set transaction isolation but before you do anything else with it? As Craig Ringer pointed out, that technique does not relieve following code of the responsibility to check for exceptions due to a lost connection, so what does it buy you but the performance hit of an extra round trip to the database? -- Lew