mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-25 20:48:08 +00:00
SQL formatting
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
This commit is contained in:
parent
804044a264
commit
ca9e359274
@ -46,14 +46,23 @@ var (
|
|||||||
SELECT
|
SELECT
|
||||||
v.phase,
|
v.phase,
|
||||||
CASE
|
CASE
|
||||||
|
<<<<<<< HEAD
|
||||||
when a.query ~ '^autovacuum.*to prevent wraparound' then 'wraparound'
|
when a.query ~ '^autovacuum.*to prevent wraparound' then 'wraparound'
|
||||||
when a.query ~* '^vacuum' then 'user'
|
when a.query ~* '^vacuum' then 'user'
|
||||||
when a.pid is null then 'idle'
|
when a.pid is null then 'idle'
|
||||||
ELSE 'regular'
|
ELSE 'regular'
|
||||||
END AS mode,
|
END AS mode,
|
||||||
count(1) AS workers_count
|
count(1) AS workers_count
|
||||||
|
=======
|
||||||
|
WHEN a.query ~ '^autovacuum.*to prevent wraparound' THEN 'wraparound'
|
||||||
|
WHEN a.query ~* '^vacuum' THEN 'user'
|
||||||
|
WHEN a.pid is NULL THEN 'idle'
|
||||||
|
ELSE 'regular'
|
||||||
|
END as mode,
|
||||||
|
count(1) as workers_count
|
||||||
|
>>>>>>> c928d57 (SQL formatting)
|
||||||
FROM pg_stat_progress_vacuum v
|
FROM pg_stat_progress_vacuum v
|
||||||
LEFT JOIN pg_catalog.pg_stat_activity a using (pid)
|
LEFT JOIN pg_catalog.pg_stat_activity a USING (pid)
|
||||||
GROUP BY 1,2
|
GROUP BY 1,2
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user