Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jC8oU-0002MM-4K for pgsql-general@arkaria.postgresql.org; Wed, 11 Mar 2020 21:22:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jC8oS-0002nf-WB for pgsql-general@arkaria.postgresql.org; Wed, 11 Mar 2020 21:22:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jC8oS-0002nY-N2 for pgsql-general@lists.postgresql.org; Wed, 11 Mar 2020 21:22:48 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jC8oP-0007Wp-5j for pgsql-general@lists.postgresql.org; Wed, 11 Mar 2020 21:22:48 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id F10F027E5; Wed, 11 Mar 2020 22:22:43 +0100 (CET) Date: Wed, 11 Mar 2020 22:22:43 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: strange locks on PG 11 with Golang programs Message-ID: <20200311212243.GA15977@hjp.at> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" 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 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-03-09 11:02:37 +0200, Achilleas Mantzios wrote: > Fully review your programs for connection / xaction leaks. Do you use a > connection pool? Go's sql package encourages the use of connection pools (type DB) over single connections (type Conn): | Prefer running queries from DB unless there is a specific need for a | continuous single database connection. All tutorials I've seen follow this recommendation, so a Go programmer might not even be aware that connections exist. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl5pVp4ACgkQ8g5IURL+ KF3uexAApjEA0P4K8zsDnOdCZWlc/lDiflKT9qScUYwgGPUWtOBXA84PhVDE96Ea fRlGwyOOKA9nglvBHV0c3kt8Y6uR6Njn1EoiPUtqNbCQT4f1KF//P+ZsyDUNz/kJ oLr9fQoc3bxjSX2x79K5END4CIYWwT5HtAyZ2363bgkLAW6gvEaWVhfh33lndZdv 7phr0CTOsmf5jc0m3xwPJ653wse7huPRMGGPDzeRR9mksaMWEZs2BJfTsZ58VD67 qYVFU+ReEt5kHy5T6U7jXJxJwHLfINgiHnVewFle+M1eTMlduaUGNprOVNPjyEhY S5YvR6KoI4oORZ6qvR3NJBz/8gyNST97h0xxP2+5wu6CFDIkMnCnj2pet4AFvvDi pZboGr0qdLx5l1pklrxT+IhVRQKbiSleOBcIuo8HiKf4HaQcZTp0Xuq81LuXo8KE gWqxPW9NvKBgTzev3/2uNSlG01GjKgA/SVaN8qwGEBnSN6lqG0xH6/NIUBsljtRj Q55c2HsqMmy4A6PhHVQITjs3dGf6kaC4PU0Arg4jMlPFH8RoZ4hAgIDd4/EwLZHT vloPLSzlWbPLF2XYhR6U/IW90VVCXZm6SZK4FvcZ7CUyStYTq0Ia+gOiPbrswK7N kVT4VZ54wzb189D8wplrNRIyj5A9u1L9Zmvj0AkAOVT4PMs2rjU= =asb9 -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1--