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 1jY8p1-0004z2-U1 for pgsql-general@arkaria.postgresql.org; Mon, 11 May 2020 13:50:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jY8p0-0004S9-Oh for pgsql-general@arkaria.postgresql.org; Mon, 11 May 2020 13:50:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jY8p0-0004S2-H0 for pgsql-general@lists.postgresql.org; Mon, 11 May 2020 13:50:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jY8ow-0006QU-MA for pgsql-general@lists.postgresql.org; Mon, 11 May 2020 13:50:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04BDoC4K029383; Mon, 11 May 2020 09:50:13 -0400 From: Tom Lane To: Matthias Apitz cc: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;' In-reply-to: <20200511065450.GA20181@sh4-5.1blu.de> References: <20200427122123.GA11416@sh4-5.1blu.de> <5198.1587991204@sss.pgh.pa.us> <20200427130618.GA24964@sh4-5.1blu.de> <20200427131955.GB24964@sh4-5.1blu.de> <20200428081018.GB4007@sh4-5.1blu.de> <20200510105226.GA14033@sh4-5.1blu.de> <9787.1589124821@sss.pgh.pa.us> <20200511065450.GA20181@sh4-5.1blu.de> Comments: In-reply-to Matthias Apitz message dated "Mon, 11 May 2020 08:54:50 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29381.1589205012.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 11 May 2020 09:50:12 -0400 Message-ID: <29382.1589205012@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Matthias Apitz writes: > I launched a shell script to get some more information in this case: ok > The process with the PID in question is 'postmaster': Yeah, this should actually be a newly-forked postmaster child process, but it won't have done anything yet to change its ps-visible command line. > postmaste 14622 postgres 9u IPv4 131903453 0t0 TCP sr= ap32dxr1.dev.oclc.org:5432->srap32dxr1.dev.oclc.org:44836 (ESTABLISHED) OK, so it's gotten a TCP not Unix-socket connection; that's already going to narrow things a little bit. > Interestingly, the other side of this connection of the port 5432 is not > visible, i.e. a 'lsof -P | grep 5432' does not show it in this moment. Permissions problem maybe? I'm not sure that lsof will tell you much about non-postgres-owned processes, unless you run it as root. regards, tom lane