Closed casperr0 closed 4 years ago
I am not the original author of the template. I tried figuring out why query_start was used in the first place. It sounds like your query is way more reasonable. The template descrition promises to monitor transactions and not specific queries of a a transaction. So I'm going to merge the changes.
Would be great if you could do a double check whether this query works in all supported version of postgresql.
This query should work for all versions of PG starting from 9.2
Thanks
reason: xact_start - Time when this process' current transaction was started, or null if no transaction is active. If the current query is the first of its transaction, this column is equal to the query_start column. query_start - Time when the currently active query was started, or if state is not active, when the last query was started