Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpJW1-0007Ja-2J for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Sep 2016 18:23:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpJW0-0001b6-CF for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Sep 2016 18:23:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpJVz-0001az-EA for pgsql-hackers@postgresql.org; Wed, 28 Sep 2016 18:23:31 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bpJVw-0008Bg-96 for pgsql-hackers@postgresql.org; Wed, 28 Sep 2016 18:23:30 +0000 Received: by mail-wm0-x235.google.com with SMTP id l132so250903923wmf.0 for ; Wed, 28 Sep 2016 11:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=x1LGl2bs8YcbIImZyKbM5PUTvlWfZmMUPbEFjL+MKyI=; b=At+g5MUjpNzqOsjGdEmmYFKjYj1rLKZUwZklg8bsS0BKd8ytngr1nFxmvZ50U1l4bD 7biHT9zk+51ngmE15Us2dW4VU1na5pb4Itx1tW+vjDbWO99nbxvc37MVXr2pw3dd149f g3wXCZO5pZiZiAsOHv5SC6OF8Vuz/vkvitjoMJR6a11zBBdQ551CXYkTAF9i/MNQMqhR iQRe1eqT1r+Xt3COmqraC7EAkgv2M/fl2+IcjelGxxgg89Y1qv8ja8UO73468fjvfNEN XewReaFsY80MtLtwAFxTGaQUFyT7lwNIUtLEFah4WdZLiN45H+ygsGJMc7ReeuvoySzs ppGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=x1LGl2bs8YcbIImZyKbM5PUTvlWfZmMUPbEFjL+MKyI=; b=AZsjwUD/fT4q+zvFyl3+N0Whv0HGMydNivekjJxckfWw4qJ8hFT6MyPV+mfgvlFDfk n168dLN+3eAKXNi3t+bA3etyx3ZNFLvcUkcxkcSs1kGSxaoRtqn3G1mD+BL2mQwZJ3wC hreT/sy2GKqXdJOvsV7FFayoJgPA58bTFPQGws39Ma7OaB8KKB1H4gEcSnvvRjXJ++TU 8FDf2UjBXrohk29XQm6AhXyVEwGRkO/pDl1jsgbGe5TALgte4y7JLHQ1Ah8Y01NKs5+M LDi1wTc2RKn5Euwm9VQEIWAAuhOAs200kdyZpWNpQ3zUAdbqmeSUcaUKXDswNESeMZml HOWg== X-Gm-Message-State: AE9vXwN5YpGti8cnKr4D2xdLNn2DdMP2uPQQzyliJwpF3DBSzDfkbypGYF9R3tLrD9RBQeJVFhSEckFwQfoZ0kfBkADpyDMi7dHtdkp7aoTzxd5G4smAnOIb0PB3IcVh5C7uHviKoCHlDkTA/fU2V3KGYrq3i0S05pGFAE/g71+bLiImpfS5Fs0KK+Sk6y6WTA== X-Received: by 10.194.93.198 with SMTP id cw6mr28954474wjb.212.1475087006569; Wed, 28 Sep 2016 11:23:26 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id e187sm10123162wma.21.2016.09.28.11.23.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2016 11:23:25 -0700 (PDT) Subject: Re: psql casts aspersions on server reliability To: David Steele , Robert Haas , Tom Lane References: <15946.1475068481@sss.pgh.pa.us> <369be187-8843-32da-17d6-cb64ad2c2154@pgmasters.net> Cc: "pgsql-hackers@postgresql.org" From: Petr Jelinek Message-ID: Date: Wed, 28 Sep 2016 20:23:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <369be187-8843-32da-17d6-cb64ad2c2154@pgmasters.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 28/09/16 17:13, David Steele wrote: > On 9/28/16 10:22 AM, Robert Haas wrote: >> On Wed, Sep 28, 2016 at 9:14 AM, Tom Lane wrote: >>> Robert Haas writes: >>>> psql tends to do things like this: >>>> rhaas=# select * from pg_stat_activity; >>>> FATAL: terminating connection due to administrator command >>>> server closed the connection unexpectedly >>>> This probably means the server terminated abnormally >>>> before or while processing the request. >>> >>>> Basically everything psql has to say about this is a lie: >>> >>> I cannot get terribly excited about this. What you seem to be proposing >>> is that psql try to intuit the reason for connection closure from the >>> last error message it got, but that seems likely to lead to worse lies >>> than printing a boilerplate message. >>> >>> I could go along with just dropping the last sentence ("This probably...") >>> if the last error we got was FATAL level. I don't find "unexpectedly" >>> to be problematic here: from the point of view of psql, and probably >>> of its user, the shutdown *was* unexpected. >> >> I don't care very much whether we try to intuit the reason for >> connection closure or not; it could be done, but I don't feel that it >> has to be done. My bigger point is that currently psql speculates >> that the reason for *every* connection closure is abnormal server >> termination, which is actually a very rare event. >> >> It may have been common when that message was added. >> 1a17447be1186fdd36391c58a2a0209f613d89c4 changed the wording this >> message in 2001, and the original message seems to date to >> 011ee13131f6fa2f6dbafd3827b70d051cb28f64 in 1996. And my guess is at >> that time the server probably did just roll over and die with some >> regularity. But today it usually doesn't. It's neither helpful nor >> good PR for libpq to guess that the most likely cause of a server >> disconnection is server unreliability. >> >> I have seen actual instances of customers getting upset by this >> message even though the server had been shut down quite cleanly. The >> message got into a logfile and induced minor panic. Fortunately, I >> have not seen this happen lately. > > +1 for making this error message less frightening. I have also had to > explain it away on occasion. > +1 I've seen this being misleading way too often. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers