Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9DK-0004Z8-B1 for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 17:05:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lD9DJ-000843-9d for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 17:05:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9DJ-00083w-2D for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 17:05:09 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD9DA-000412-FO for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 17:05:08 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 2C81544F5; Fri, 19 Feb 2021 18:04:56 +0100 (CET) Date: Fri, 19 Feb 2021 18:04:56 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: checkpointer and other server processes crashing Message-ID: <20210219170456.GE10464@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VUDLurXRWRKrGuMn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --VUDLurXRWRKrGuMn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-02-15 16:15:44 -0500, Joe Abbate wrote: > As I understand it, the PG server processes doing a SELECT are spawned as > children of the Go process, There's a misconception here: The server processes are children of the postmaster process, not of the client program (whether it's written in Go or any other language). Think about it: The database server and the client may not even be on the same machine, so there cannot be a parent/child relationship between client and server processes. > so presumably if a "goroutine" dies, the associated PG process would > die too, A server process will terminate when the connection is closed, but it may not notice that immediately. Moreover, since Goroutines are handled by the Go runtime, not the Linux kernel, the connection may not be closed just because a goroutine terminates (actually, I think the standard API pretty much guarantuees the existence of a connection pool). hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --VUDLurXRWRKrGuMn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmAv77MACgkQ8g5IURL+ KF0fAxAApAWcZ7UpSpwTEsyMoNb9VGWo+djdoHrqMTHcLWMrYl/jH6EOFuER/BWy qrhQuxXI0BGT2neXG2RSFgIV305GNsjvxXG5E+7/MfOQZnKSB/oqWfTUzMqkDXPj i9EPqM7ef43iYMN1Evb5kg68ClAcV8n5bqy0mil32Z0Eyn5K1aea+cPxH43Ao6NQ UASVPpiHUVhHbs1SBB5sZjbjoCmBo9YZMSvQmTFvkX1Zk8Pw2VvIgH1OCICw+0JH Jg69r7fM9zFOYIu0UD9vLaS0HKIzoxEuLIXOzk9Gu1Ybrg0yWSivBJNgYCvSjZl5 xr0nJxYObXqZYYz1NDz3OaRFQVQzJnoaUgADablBU/w3bGEvnxr1l46EaVtz64B4 qTAnVBGnDGgAtq008wF9Rjyu75BcD63YBBcfehzMxKqRSwxAZhtxItlLm+B17FxJ yrNfQyCFDneGjEAuqsQK57tSMTi+3W341T3eIVUKqbX4Jb6T7qoirHaP6tJHM1ms J1QofbBDpMXp7JJVLSkZ++VdvZI7inHD3/B8P0OXHPWVXgXKu1JwysyCaJ0FElZI 17hf/4xcthVmsIBD1dxOwbEk0gSTXh0PuN9lcycq9L41nX6qE3nKjRL0UthgZwQ7 931h4kdLyQ4fwy8+nqGuMTkYgTHl4OTNoYbimeSmSbzMnbCbiB4= =JaJe -----END PGP SIGNATURE----- --VUDLurXRWRKrGuMn--