Skip to content

Commit 121edc7

Browse files
SticksmanSuperQ
andauthored
Update collector/pg_long_running_transactions.go
Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Felix Yuan <[email protected]>
1 parent b1506c7 commit 121edc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector/pg_long_running_transactions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var (
5252
longRunningTransactionsQuery = `
5353
SELECT
5454
COUNT(*) as transactions,
55-
MAX(EXTRACT(EPOCH FROM (clock_timestamp() - xact_start))) AS age_in_seconds
55+
MAX(EXTRACT(EPOCH FROM clock_timestamp())) AS oldest_timestamp_seconds
5656
FROM pg_catalog.pg_stat_activity
5757
WHERE state is distinct from 'idle' AND (now() - xact_start) > '1 minutes'::interval AND query not like 'autovacuum:%'
5858
`

0 commit comments

Comments
 (0)