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 1mPtiB-0006Gr-Pc for pgsql-general@arkaria.postgresql.org; Mon, 13 Sep 2021 21:41:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPtiA-000799-FQ for pgsql-general@arkaria.postgresql.org; Mon, 13 Sep 2021 21:41:58 +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 1mPtiA-000791-27 for pgsql-general@lists.postgresql.org; Mon, 13 Sep 2021 21:41:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPti7-0007N3-KK for pgsql-general@postgresql.org; Mon, 13 Sep 2021 21:41:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 18DLfrO3534192; Mon, 13 Sep 2021 17:41:53 -0400 From: Tom Lane To: David Gauthier cc: Postgres General Subject: Re: what is pg_stat_activity.query for idle connections ? In-reply-to: References: Comments: In-reply-to David Gauthier message dated "Mon, 13 Sep 2021 17:37:58 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <534190.1631569313.1@sss.pgh.pa.us> Date: Mon, 13 Sep 2021 17:41:53 -0400 Message-ID: <534191.1631569313@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Gauthier writes: > 11.3 on linux > I have a DB with a worrisome number of connections with > pg_stat_activity.query = '/* DBD::Pg ping test v3.5.3 */', all of them with > state='idle'. I have code that uses perl's ping method to ping the DB and > I suspect this is the source. Is '/* DBD::Pg ping test v3.5.3 */' the last > thing it did, but because it's idle now, it's actually doing nothing ? Yes, exactly. regards, tom lane