From postgres@kiwi-fraser.net Tue Apr 12 12:49:06 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9DBBD1337B3E for ; Tue, 12 Apr 2011 09:49:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 34184-09 for ; Tue, 12 Apr 2011 12:48:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cisx.com (failover.mail.cisx.com [78.41.6.83]) by mail.postgresql.org (Postfix) with ESMTP id ADA081337A5D for ; Tue, 12 Apr 2011 09:48:57 -0300 (ADT) Received: from DEVELOP1 ([192.168.100.50]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id p3CCmqDb000523 for ; Tue, 12 Apr 2011 13:48:57 +0100 Message-ID: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> From: "Donald Fraser" To: "[ADMIN]" Subject: Re: Missing documentation for error code: 80S01 Date: Tue, 12 Apr 2011 13:48:52 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0013_01CBF918.5BA80360" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.486 tagged_above=-10 required=5 tests=BAYES_20=-0.001, FAKE_REPLY_C=1.486, HTML_MESSAGE=0.001 X-Spam-Level: * X-Archive-Number: 201104/102 X-Sequence-Number: 37283 This is a multi-part message in MIME format. ------=_NextPart_000_0013_01CBF918.5BA80360 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Correction error code should be: 08S01 and NOT 80S01 ----- Original Message -----=20 Subject: Missing documentation for error code: 80S01 PostgreSQL version 8.3.14 There appears to be no documentation on the following error code: Error code is: 80S01 Message: "The backend has broken the connection. Possibly the action you = have attempted has caused it to close." I was expecting the code to be something like: crash_shutdown, however = that appears to be under a=20 completely different error class: 57P02. Regards Donald ------=_NextPart_000_0013_01CBF918.5BA80360 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Correction error code should be:
08S01
and = NOT
80S01
 
----- Original Message -----=20
Subject: Missing documentation for error code: = 80S01

PostgreSQL version 8.3.14
 
There appears to be no documentation on the = following error=20 code:
Error code is: 80S01
Message: "The backend has broken = the=20 connection. Possibly the action you have attempted has caused it to=20 close."
 
I was expecting the code to be something like:=20 crash_shutdown, however that appears to be under a =
completely different error class: = 57P02.
Regards
Donald
------=_NextPart_000_0013_01CBF918.5BA80360-- From tgl@sss.pgh.pa.us Tue Apr 12 14:53:19 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1BA691337B4E for ; Tue, 12 Apr 2011 11:53:19 -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 66698-05 for ; Tue, 12 Apr 2011 14:53:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 6948F1337A5D for ; Tue, 12 Apr 2011 11:53:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3CEqtne009957; Tue, 12 Apr 2011 10:52:56 -0400 (EDT) To: "Donald Fraser" cc: "[ADMIN]" Subject: Re: Missing documentation for error code: 80S01 In-reply-to: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> Comments: In-reply-to "Donald Fraser" message dated "Tue, 12 Apr 2011 13:48:52 +0100" Date: Tue, 12 Apr 2011 10:52:55 -0400 Message-ID: <9956.1302619975@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/106 X-Sequence-Number: 37287 "Donald Fraser" writes: > Correction error code should be: > 08S01 > and NOT > 80S01 The reason it's not documented by us is that Postgres doesn't generate any such error code. Must be coming from some client-side software you are using. regards, tom lane From postgres@kiwi-fraser.net Tue Apr 12 15:30:48 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5E52E1337B47 for ; Tue, 12 Apr 2011 12:30:48 -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 36376-04 for ; Tue, 12 Apr 2011 15:30:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cisx.com (failover.mail.cisx.com [78.41.6.83]) by mail.postgresql.org (Postfix) with ESMTP id 5821E1337A5D for ; Tue, 12 Apr 2011 12:30:40 -0300 (ADT) Received: from DEVELOP1 ([192.168.100.50]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id p3CFUXLa021205 for ; Tue, 12 Apr 2011 16:30:39 +0100 Message-ID: <15A735B1CE17411AA78C8191AAC90E2C@DEVELOP1> From: "Donald Fraser" To: "[ADMIN]" References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <9956.1302619975@sss.pgh.pa.us> Subject: Re: Missing documentation for error code: 80S01 Date: Tue, 12 Apr 2011 16:30:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.061 tagged_above=-10 required=5 tests=BAYES_05=-0.5, STOX_REPLY_TYPE=0.439 X-Spam-Level: X-Archive-Number: 201104/110 X-Sequence-Number: 37291 ----- Original Message ----- From: "Tom Lane" > "Donald Fraser" writes: >> Correction error code should be: >> 08S01 >> and NOT >> 80S01 > > The reason it's not documented by us is that Postgres doesn't generate > any such error code. Must be coming from some client-side software you > are using. Yes you are correct, it is coming from the PostgreSQL JDBC driver. Thanks. From Kevin.Grittner@wicourts.gov Tue Apr 12 15:37:01 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DBF651337990 for ; Tue, 12 Apr 2011 12:37:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 59209-05 for ; Tue, 12 Apr 2011 15:36:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 2FD531337BD7 for ; Tue, 12 Apr 2011 12:36:53 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 12 Apr 2011 10:36:53 -0500 Message-Id: <4DA42B42020000250003C6F8@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 12 Apr 2011 10:36:50 -0500 From: "Kevin Grittner" To: "Donald Fraser" , "[ADMIN]" Subject: Re: Missing documentation for error code: 80S01 References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> In-Reply-To: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/113 X-Sequence-Number: 37294 "Donald Fraser" wrote: > I was expecting the code to be something like: crash_shutdown, > however that appears to be under a completely different error > class: 57P02. If a JDBC client detects that the connection is broken, how would it know that it is because the server crashed? -Kevin From postgres@kiwi-fraser.net Tue Apr 12 16:04:45 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E36EC1337B3E; Tue, 12 Apr 2011 13:04:45 -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 97981-01; Tue, 12 Apr 2011 16:04:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cisx.com (failover.mail.cisx.com [78.41.6.83]) by mail.postgresql.org (Postfix) with ESMTP id E9FA61337990; Tue, 12 Apr 2011 13:04:37 -0300 (ADT) Received: from DEVELOP1 ([192.168.100.50]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id p3CG4VDR001338; Tue, 12 Apr 2011 17:04:36 +0100 Message-ID: <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> From: "Donald Fraser" To: "[JDBC]" , "[ADMIN]" References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <4DA42B42020000250003C6F8@gw.wicourts.gov> Subject: Re: Missing documentation for error code: 80S01 Date: Tue, 12 Apr 2011 17:04:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.061 tagged_above=-10 required=5 tests=BAYES_05=-0.5, STOX_REPLY_TYPE=0.439 X-Spam-Level: X-Archive-Number: 201104/115 X-Sequence-Number: 37296 ----- Original Message ----- From: "Kevin Grittner" > "Donald Fraser" wrote: > >> I was expecting the code to be something like: crash_shutdown, >> however that appears to be under a completely different error >> class: 57P02. > > If a JDBC client detects that the connection is broken, how would it > know that it is because the server crashed? > You are correct how could it. However the JDBC driver does know that the server has terminated the connection and not an IO error (via end of stream or EOF). Is the error class "57" a better prefix for this type of error? Knowing that the the only options for server shut down are: Admin shut-down or Crash shut-down ? Regards Donald From Kevin.Grittner@wicourts.gov Tue Apr 12 19:16:21 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9CD7D13364DE; Tue, 12 Apr 2011 16:16:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 05222-01; Tue, 12 Apr 2011 19:16:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 0CFBA1337B4E; Tue, 12 Apr 2011 16:16:13 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 12 Apr 2011 14:16:12 -0500 Message-Id: <4DA45EA2020000250003C711@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 12 Apr 2011 14:16:02 -0500 From: "Kevin Grittner" To: "Donald Fraser" , "[ADMIN]" , "[JDBC]" Subject: Re: Missing documentation for error code: 80S01 References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <4DA42B42020000250003C6F8@gw.wicourts.gov> <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> In-Reply-To: <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/118 X-Sequence-Number: 37299 "Donald Fraser" wrote: > the JDBC driver does know that the server has terminated the > connection [...] (via end of stream or EOF). > > Is the error class "57" a better prefix for this type of error? Possibly. Is it really true that the client will see a clean close for a canceled query or a clean server shutdown and never see a clean close of the TCP connection from the server side for other reasons? -Kevin From postgres@kiwi-fraser.net Wed Apr 13 09:57:48 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7D7381337B93; Wed, 13 Apr 2011 06:57:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 14881-09; Wed, 13 Apr 2011 09:57:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cisx.com (failover.mail.cisx.com [78.41.6.83]) by mail.postgresql.org (Postfix) with ESMTP id 3A0901337B80; Wed, 13 Apr 2011 06:57:12 -0300 (ADT) Received: from DEVELOP1 ([192.168.100.50]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id p3D9v6ci028392; Wed, 13 Apr 2011 10:57:11 +0100 Message-ID: <6A526FFBDB9D4EE2947C4E5E282530E3@DEVELOP1> From: "Donald Fraser" To: "[JDBC]" , "[ADMIN]" References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <4DA42B42020000250003C6F8@gw.wicourts.gov> <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> <4DA45EA2020000250003C711@gw.wicourts.gov> Subject: Re: Missing documentation for error code: 80S01 Date: Wed, 13 Apr 2011 10:57:05 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.461 tagged_above=-10 required=5 tests=BAYES_00=-1.9, STOX_REPLY_TYPE=0.439 X-Spam-Level: X-Archive-Number: 201104/121 X-Sequence-Number: 37302 From: "Kevin Grittner" > "Donald Fraser" wrote: > >> the JDBC driver does know that the server has terminated the >> connection [...] (via end of stream or EOF). >> >> Is the error class "57" a better prefix for this type of error? > > Possibly. Is it really true that the client will see a clean close > for a canceled query or a clean server shutdown and never see a > clean close of the TCP connection from the server side for other > reasons? Technically yes. When performing a read on the socket you get -1 indicating EOF or remote socket closed. You don't get an IO error. The difficult part is what was the client doing when the server closes the socket? If the client wasn't doing anything then the next likely action a client would perform is to execute a query which would involve writing to the socket first and in this case you will get a broken pipe IO exception, rather than remote socket closed. If the client had already executed a query and was attempting to read response data then you get remote socket closed. I would like to propose that when a "remote socket closed" is detected that the JDBC driver uses a different error code to the one used for IO exceptions. Currently for IO exceptions error code is: "08S01" For detection of remote socket closed, the error code should be different - may be "08S02" or "57P00"? I'm not really sure where or how these numbers are supposed to be used/generated. The "08" class would seem to be the most appropriate since it is connection related. Regards Donald Fraser From oliver@opencloud.com Wed Apr 13 10:36:58 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B4FFA1337B93; Wed, 13 Apr 2011 07:36:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 23947-01; Wed, 13 Apr 2011 10:36:38 +0000 (UTC) X-Greylist: delayed 00:06:18.572949 by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id 9BF731337B80; Wed, 13 Apr 2011 07:36:37 -0300 (ADT) Received: by pxi15 with SMTP id 15so319396pxi.33 for ; Wed, 13 Apr 2011 03:36:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.56.18 with SMTP id e18mr7196677wfa.122.1302690617778; Wed, 13 Apr 2011 03:30:17 -0700 (PDT) Received: by 10.68.56.166 with HTTP; Wed, 13 Apr 2011 03:30:17 -0700 (PDT) In-Reply-To: <6A526FFBDB9D4EE2947C4E5E282530E3@DEVELOP1> References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <4DA42B42020000250003C6F8@gw.wicourts.gov> <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> <4DA45EA2020000250003C711@gw.wicourts.gov> <6A526FFBDB9D4EE2947C4E5E282530E3@DEVELOP1> Date: Wed, 13 Apr 2011 22:30:17 +1200 Message-ID: Subject: Re: [JDBC] Missing documentation for error code: 80S01 From: Oliver Jowett To: Donald Fraser Cc: "[JDBC]" , "[ADMIN]" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/122 X-Sequence-Number: 37303 On 13 April 2011 21:57, Donald Fraser wrote: > Technically yes. When performing a read on the socket you get -1 indicating > EOF or remote socket closed. You don't get an IO error. > The difficult part is what was the client doing when the server closes the > socket? > If the client wasn't doing anything then the next likely action a client > would perform is to execute a query which would involve writing to the > socket first and in this case you will get a broken pipe IO exception, > rather than remote socket closed. > If the client had already executed a query and was attempting to read > response data then you get remote socket closed. > > I would like to propose that when a "remote socket closed" is detected that > the JDBC driver uses a different error code to the one used for IO > exceptions. If the server is shut down mid-query, doesn't the backend complete the current query cycle before closing the connection? i.e. we'd see ErrorResponse, ReadyForQuery, and return control to the app before seeing EOF anyway? The protocol spec is a bit vague there. Oliver From postgres@kiwi-fraser.net Wed Apr 13 10:52:34 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3497D1337B68 for ; Wed, 13 Apr 2011 07:52:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 74955-01; Wed, 13 Apr 2011 10:52:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cisx.com (failover.mail.cisx.com [78.41.6.83]) by mail.postgresql.org (Postfix) with ESMTP id 9108113364DE; Wed, 13 Apr 2011 07:52:19 -0300 (ADT) Received: from DEVELOP1 ([192.168.100.50]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id p3DAqDoV031993; Wed, 13 Apr 2011 11:52:19 +0100 Message-ID: From: "Donald Fraser" To: "[BUGS]" , "[ADMIN]" References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1><4DA42B42020000250003C6F8@gw.wicourts.gov><3670D8885C9549A393E47A0C1582B07A@DEVELOP1><4DA45EA2020000250003C711@gw.wicourts.gov><6A526FFBDB9D4EE2947C4E5E282530E3@DEVELOP1> Subject: Re: [JDBC] Missing documentation for error code: 80S01 Date: Wed, 13 Apr 2011 11:52:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.061 tagged_above=-10 required=5 tests=BAYES_05=-0.5, STOX_REPLY_TYPE=0.439 X-Spam-Level: X-Archive-Number: 201104/123 X-Sequence-Number: 37304 From: "Oliver Jowett" > If the server is shut down mid-query, doesn't the backend complete the > current query cycle before closing the connection? > i.e. we'd see ErrorResponse, ReadyForQuery, and return control to the > app before seeing EOF anyway? > The protocol spec is a bit vague there. From robertmhaas@gmail.com Mon Apr 25 19:57:25 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1C1BD1337B69 for ; Mon, 25 Apr 2011 16:57:25 -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 83343-05; Mon, 25 Apr 2011 19:57:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f46.google.com (mail-yw0-f46.google.com [209.85.213.46]) by mail.postgresql.org (Postfix) with ESMTP id 05CB8133740B; Mon, 25 Apr 2011 16:57:16 -0300 (ADT) Received: by ywj3 with SMTP id 3so755401ywj.19 for ; Mon, 25 Apr 2011 12:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=E6/5jV1B93QLzHik1h8R9LKcusH93FHK9qpZSAfCXbA=; b=d4AT0SAx6MUlUiMS/1xE8iyAxs1L9TzB8onPR5ro7UBm2tae09WeVN20+xeZitaZrn rIYosTMw+G8r/h8GteRc1L0bacbHf0EBZPg3GclDLBz6zuEsgRIN2vimg2cqPBZy0mUV LgmYklu9fh2koxEEPG2wtC5r0yfsS2NtKD5UI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AL8WvlEFuUCoaGYh16/MoOt82AulFqoygbu46PW6EZNVL6vLQq1ulENdfF5gPSRy9c IGYymjYyPto9WmeEqMyEQ15fHBacimbGnzdMm5n4/XvAzLyVz6f0MHBH47x6vvFrPcgZ JMj6PXLhYERQjlXBj1PHpD5MnRgDCjQLnICTU= MIME-Version: 1.0 Received: by 10.236.195.3 with SMTP id o3mr4574313yhn.133.1303761437514; Mon, 25 Apr 2011 12:57:17 -0700 (PDT) Received: by 10.236.105.212 with HTTP; Mon, 25 Apr 2011 12:57:17 -0700 (PDT) In-Reply-To: References: <00C88DF265FC483EBE2322C834A76698@DEVELOP1> <4DA42B42020000250003C6F8@gw.wicourts.gov> <3670D8885C9549A393E47A0C1582B07A@DEVELOP1> <4DA45EA2020000250003C711@gw.wicourts.gov> <6A526FFBDB9D4EE2947C4E5E282530E3@DEVELOP1> Date: Mon, 25 Apr 2011 15:57:17 -0400 Message-ID: Subject: Re: [BUGS] [JDBC] Missing documentation for error code: 80S01 From: Robert Haas To: Donald Fraser Cc: "[BUGS]" , "[ADMIN]" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201104/225 X-Sequence-Number: 37406 On Wed, Apr 13, 2011 at 6:52 AM, Donald Fraser wrote: >> If the server is shut down mid-query, doesn't the backend complete the >> current query cycle before closing the connection? >> i.e. we'd see ErrorResponse, ReadyForQuery, and return control to the >> app before seeing EOF anyway? >> The protocol spec is a bit vague there. > > From an observation perspective only: It would seem that in the case where > the server is shut down gracefully yes, however in the case where the server > has either crashed or the connection terminated un-gracefully via software > control (for example a C funcion: elog(FATAL, "Terminating connection...");) > then no. A smart shutdown waits for clients to exit on their own. A fast or immediate shutdown kills them immediately, even mid-query. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company