Skip to content

Commit 987c599

Browse files
store: Handle materialized view not being populated
Signed-off-by: Maksim Dimitrov <[email protected]>
1 parent dfa689c commit 987c599

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

store/postgres/src/detail.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,13 @@ fn deployment_sizes(
470470
r#"
471471
SELECT
472472
ds.id,
473-
ss.row_estimate::bigint,
474-
ss.table_bytes::bigint,
475-
ss.index_bytes::bigint,
476-
ss.toast_bytes::bigint,
477-
ss.total_bytes::bigint
473+
COALESCE(ss.row_estimate, 0)::bigint,
474+
COALESCE(ss.table_bytes, 0)::bigint,
475+
COALESCE(ss.index_bytes, 0)::bigint,
476+
COALESCE(ss.toast_bytes, 0)::bigint,
477+
COALESCE(ss.total_bytes, 0)::bigint
478478
FROM deployment_schemas ds
479-
JOIN info.subgraph_sizes as ss on ss.name = ds.name
479+
LEFT JOIN info.subgraph_sizes as ss on ss.name = ds.name
480480
"#,
481481
);
482482

0 commit comments

Comments
 (0)