Skip to content

Commit 33ec5e1

Browse files
committed
fix(compute_ctl): Use coalesce without schema as it's not a catalog func
1 parent 312a74f commit 33ec5e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compute_tools/src/monitor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ fn get_database_stats(cli: &mut Client) -> anyhow::Result<(f64, i64)> {
407407
// like `postgres_exporter` use it to query Postgres statistics.
408408
// Use explicit 8 bytes type casts to match Rust types.
409409
let stats = cli.query_one(
410-
"SELECT pg_catalog.coalesce(pg_catalog.sum(active_time), 0.0)::pg_catalog.float8 AS total_active_time,
411-
pg_catalog.coalesce(pg_catalog.sum(sessions), 0)::pg_catalog.bigint AS total_sessions
410+
"SELECT COALESCE(pg_catalog.sum(active_time), 0.0)::pg_catalog.float8 AS total_active_time,
411+
COALESCE(pg_catalog.sum(sessions), 0)::pg_catalog.bigint AS total_sessions
412412
FROM pg_catalog.pg_stat_database
413413
WHERE datname NOT IN (
414414
'postgres',

0 commit comments

Comments
 (0)