Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite17bd10

Browse files
Removed skipping indexes with estimated bloat < 10%
1 parent0ac3842 commite17bd10

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A complete PostgreSQL monitoring solution with automated performance analysis an
1111

1212
**Database:**
1313
- Supports PostgreSQL versions 14-17
14-
-**pg_stat_statements extension must beenabled** forquery performance monitoring
14+
-**pg_stat_statements extension must becreated** fordb used for connection
1515

1616
##⚠️ Security Notice
1717

@@ -75,14 +75,16 @@ curl -o postgres_ai https://gitlab.com/postgres-ai/postgres_ai/-/raw/main/postgr
7575
&& chmod +x postgres_ai
7676
```
7777

78-
Now, start it and wait for a few minutes.Get a Postgres AI access token for your organizationathttps://console.postgres.ai (`Your org name → Manage → Access tokens`):
78+
Now, start it and wait for a few minutes.To obtain Postgres AI access token for your organizationvisithttps://console.postgres.ai (`Your org name → Manage → Access tokens`):
7979

8080
```bash
8181
# Production setup with your Access token
8282
./postgres_ai quickstart --api-key=your_access_token
8383
```
8484
**Note:** You can also add your database instance in the same command:
85+
```bash
8586
./postgres_ai quickstart --api-key=your_access_token --add-instance="postgresql://user:pass@host:port/db"
87+
```
8688

8789
Or if you want to just check out how it works:
8890
```bash

‎reporter/postgres_reports.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,11 @@ def generate_f005_btree_bloat_report(self, cluster: str = "local", node_name: st
764764
total_bloat_size=0
765765

766766
forindex_datainbloated_indexes.values():
767-
# Skip indexes with minimal bloat
768-
ifindex_data['bloat_pct']>=10:# Only report indexes with >= 10% bloat
769-
index_data['extra_size_pretty']=self.format_bytes(index_data['extra_size'])
770-
index_data['bloat_size_pretty']=self.format_bytes(index_data['bloat_size'])
767+
index_data['extra_size_pretty']=self.format_bytes(index_data['extra_size'])
768+
index_data['bloat_size_pretty']=self.format_bytes(index_data['bloat_size'])
771769

772-
bloated_indexes_list.append(index_data)
773-
total_bloat_size+=index_data['bloat_size']
770+
bloated_indexes_list.append(index_data)
771+
total_bloat_size+=index_data['bloat_size']
774772

775773
# Sort by bloat percentage descending
776774
bloated_indexes_list.sort(key=lambdax:x['bloat_pct'],reverse=True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp