Skip to content

Commit

Permalink
Export db size metrics for 10 user databases (#7857)
Browse files Browse the repository at this point in the history
## Problem

One database is too limiting. We have agreed to raise this limit to 10.

## Checklist before requesting a review

- [x] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant
metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with
/release-notes label and add several sentences in this section.

## Checklist before merging

- [ ] Do not forget to reformat commit message to not include the above
checklist
  • Loading branch information
zaynetro committed May 24, 2024
1 parent 0e4f182 commit c1f4028
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vm-image-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ files:
- metric_name: pg_stats_userdb
type: gauge
help: 'Stats for the oldest non-system db'
help: 'Stats for several oldest non-system dbs'
key_labels:
- datname
value_label: kind
Expand All @@ -205,9 +205,8 @@ files:
- inserted
- updated
- deleted
# We export stats for only one non-system database. Without this limit
# We export stats for 10 non-system database. Without this limit
# it is too easy to abuse the system by creating lots of databases.
# We can try lifting this limit in the future after we understand the needs better.
query: |
select pg_database_size(datname) as db_size, deadlocks,
tup_inserted as inserted, tup_updated as updated, tup_deleted as deleted,
Expand All @@ -218,7 +217,7 @@ files:
from pg_database
where datname <> 'postgres' and not datistemplate
order by oid
limit 1
limit 10
);
- metric_name: max_cluster_size
Expand Down

1 comment on commit c1f4028

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3202 tests run: 3062 passed, 0 failed, 140 skipped (full report)


Flaky tests (1)

Postgres 15

  • test_ancestor_detach_reparents_earlier: debug

Code coverage* (full report)

  • functions: 31.4% (6445 of 20541 functions)
  • lines: 48.3% (49838 of 103239 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
c1f4028 at 2024-05-24T09:36:05.840Z :recycle:

Please sign in to comment.