Re: pg_stat_activity - Mailing list pgsql-admin

From Ron
Subject Re: pg_stat_activity
Date
Msg-id 6ef6f956-595e-d0c4-36bd-dd9d10772b11@gmail.com
Whole thread Raw
In response to Re: pg_stat_activity  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
On 06/11/2018 10:21 AM, David G. Johnston wrote:
On Mon, Jun 11, 2018 at 8:07 AM, Ron <ronljohnsonjr@gmail.com> wrote:
That won't work, because that would catch any query on a table which happens to have the string "select" in a table, index or column name.

​I don't believe what you are asking is possible using only pg_stat_activity.  One thought that comes to mind is to identify, via pg_locks, sessions that hold non-read-only locks and then exclude the rows in pg_stat_activity that match up with those sessions.

David J.

Thanks.  I'll try that.

--
Angular momentum makes the world go 'round.

pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_stat_activity
Next
From: Rui DeSousa
Date:
Subject: Re: pg_stat_activity