X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9540152969 for ; Tue, 5 Jul 2005 11:43:10 -0300 (ADT) 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 08551-05 for ; Tue, 5 Jul 2005 14:43:05 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EF35652816 for ; Tue, 5 Jul 2005 11:43:04 -0300 (ADT) 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 j65Eh9fL013033; Tue, 5 Jul 2005 10:43:09 -0400 (EDT) To: jtv@xs4all.nl Cc: pgsql-interfaces@postgresql.org Subject: Re: libpq and connection failures In-reply-to: <21028.202.47.227.25.1120571298.squirrel@202.47.227.25> References: <21028.202.47.227.25.1120571298.squirrel@202.47.227.25> Comments: In-reply-to jtv@xs4all.nl message dated "Tue, 05 Jul 2005 15:48:18 +0200" Date: Tue, 05 Jul 2005 10:43:09 -0400 Message-ID: <13032.1120574589@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/5 X-Sequence-Number: 5641 jtv@xs4all.nl writes: > Is there any reason why pqReadData() (interfaces/libpq/fe-misc.c), if > pqsecure_read() fails with an error that isn't special-cased as a > transient one, returns -1 but leaves the connection state at > CONNECTION_OK? I think it's probably better to have the default assumption be "connection possibly recoverable" than have it be "summarily kill connection at first hint of trouble". The latter seems less robust not more so. regards, tom lane