Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txpTJ-00FGBt-Of for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Mar 2025 15:48:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1txpTH-008nmc-PN for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Mar 2025 15:48:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txpTH-008nmU-FM for pgsql-hackers@lists.postgresql.org; Thu, 27 Mar 2025 15:48:43 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1txpTE-001XUJ-2E for pgsql-hackers@postgresql.org; Thu, 27 Mar 2025 15:48:43 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-ac2dfdf3c38so199586566b.3 for ; Thu, 27 Mar 2025 08:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743090519; x=1743695319; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7fopge5e+EF4KwSPTwjSmbJ+T+B4mbixgn3Z+A95Wvg=; b=gKIKyfz/6+GY0yh4+LDRGPpPLiTK7Y4h2RKn9xD3IoXXO7einlUKP2L+VwCIisZtqJ /ZTe5j4HpZd26xxB3IeJ7qrkQvriu4vpJg4HPVraEX3WlDU01qZs68FuTrbQ6lR6ePcr SAkE6jUwb3Cr19thWGCNz7c5PcDHBrSPjwT7bVWOjVBbcD5LTpehxw37dLaEIxB8lAFm g/r0/WoDXM0gO7Y1K1el9ZGt0dRkPck3h1f5cCnSQUpIeL4KqN0h/r3ZooCIATwxUQmi iWaR3Ii7rGkrcJm8i6NcfrMXM5A9rNjqOOR8bXXZTRZ2j7bwYm4xmh+b4gwM66qg3tyQ rHdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743090519; x=1743695319; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7fopge5e+EF4KwSPTwjSmbJ+T+B4mbixgn3Z+A95Wvg=; b=rMRg3fGsJeTd316IhmtCy1NhElYf//JUzQLf+RrXKuCSXcVOb2rAru+Q0OTrk768G1 +W/HZZZVwBtT8PUlJ6rieCozEJkRUC4cGSR+ZjjvH/Tal3m1B0C1mzUcV84yH5NieMn1 r1/UqYNd0X5fHLfCiePfpi1EYU0q5hUZmWRH89BJmgSrP/YEiqwNp8I1YiBF9MwOC3E+ TIoMszhwwv0H2nK/QSfgSYoCM6KgWe4KAHOrhNEE3Fya85xe5qDWFuhuuw1YYLyoWmNV UqFtujlzr9G3/YX7Adih/W8OzkCsqHXIqcm/+s1Z8Y+XeRloirhC/Arjey5rokF5fOP5 8tvw== X-Gm-Message-State: AOJu0YyajrRtboSt7/qru5CrlN4uzUBgNmEKLmmxeFpflcl0u8y2e799 3/9qD3Z6mg5awX7OHqR5m9yPxB96c7V+QHun183bIz6gO2extIYePnSnsEukDdmlIu9x4hyJDRJ 6q0usr/urGfM21LvncmdRfa+Hp86t7Hg1 X-Gm-Gg: ASbGncsj4kEYIiXaz87DW3nVLvNfNyLU5N/XPnZL0X6ojJRB9CxNf6ECU3TE8LODoH9 UOpVC6bBXogWKPb9tNtGHvkQi+Ah1+YJVVClkCVLjFcMMTXHKbSo7MwwU4ahfuv9Mc6SyzPVvCh 1ozlOy5VwFB80CeMVRsFTVPkJ4hg== X-Google-Smtp-Source: AGHT+IEnoIF3NM87C+NlHx0A10D6CNmV/KXE/ggdpn8HOuS4f79ppxPx7h2UkVEsG4kCo3chdpTM6RWnPRCYNQXfA4U= X-Received: by 2002:a17:906:d553:b0:abf:641a:5727 with SMTP id a640c23a62f3a-ac6fae44e6fmr393215566b.7.1743090517841; Thu, 27 Mar 2025 08:48:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Thu, 27 Mar 2025 11:48:26 -0400 X-Gm-Features: AQ5f1JqH_TrXR3bDKu6bC9mp1H2LT0MY2YyOAcpyF8Twql2wP3VON75kU4XQxEo Message-ID: Subject: Re: libpq maligning postgres stability To: Andres Freund Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 27, 2025 at 11:19=E2=80=AFAM Andres Freund = wrote: > We have several places in libpq where libpq says that a connection closin= g is > probably due to a server crash with a message like: > > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing > > I think this is rather unhelpful, at least these days. There are a lot of > reasons the connection could have failed, the server having terminated > abnormally is just one of them. > > It's common to see this due to network issues, for example. I've quite a= few > times fielded worried questions of postgres users due to the message. Yeah, I agree. I used to think this hint was helpful, but it's gotten less helpful as the years have passed, because the server is more stable these days. Another thing that can cause this (as discussed in Discord) is that the individual backend process can have died, but not the server as a whole. In that case, the hint is only accurate if you mean "server" to read your individual server process. I wonder if, in addition to removing the hint, we could also consider rewording the message. For example, a slight rewording to "server connection closed unexpectedly" would avoid implying that it was the server that took action, which is correct, because it could be a firewall in between the machines or even security software on the client side. Maybe there is some more dramatic rewording that is even better, but there's probably some value in keeping it similar to what people are used to seeing. --=20 Robert Haas EDB: http://www.enterprisedb.com