Search Postgresql Archives

Re: relationship of backend_start, query_start, state_change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

On Thu, Apr 23, 2020 at 6:55 PM David G. Johnston <david.g.johnston@xxxxxxxxx> wrote:
On Thu, Apr 23, 2020 at 9:37 AM Si Chen <sichen@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,

I'm looking at my pg_stat_activity and trying to figure out what is causing some of these processes.  I'm using this query:

SELECT pid, wait_event, state_change, backend_start, xact_start, query_start, state_change - query_start, query from pg_stat_activity where datname= 'my_database' and state in ('idle', 'idle in transaction', 'idle in transaction (aborted)', 'disabled');



Including the "state" field should clear things up considerably.

 
David J.

The transactions are idle, they are filtered in the WHERE statement.

--
Olivier Gautherot


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux