I am reviewing over the pg_stat_activity view. And there are two fields that are indistinguishable to me:
xact_start:The time at which the transaction started to run which could be different than the query_start but should always have occurred before the query_start time.
query_start: The time at which the query started to run. This can be useful to determine if a query has been running for a long time.
It says they both determine the start time of the query. It also says that xact_start can be different than query_start, but doesn't explain why - only that it should start prior to query_start. But what is the actual difference between the two? Why would I care about xact_start?