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

Commitaf412d0

Browse files
Merge remote-tracking branch 'origin/main' into improve-unused-indexes-report
2 parentsf8ebe79 +0894079 commitaf412d0

File tree

5 files changed

+1141
-32
lines changed

5 files changed

+1141
-32
lines changed

‎README.md‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,9 @@ create user postgres_ai_mon with password '<password>';
9595
grant connecton database<database_name> to postgres_ai_mon;
9696

9797
grant pg_monitor to postgres_ai_mon;
98-
grantselecton pg_stat_statements to postgres_ai_mon;
99-
grantselecton pg_stat_database to postgres_ai_mon;
100-
grantselecton pg_stat_user_tables to postgres_ai_mon;
101-
grantselecton pg_stat_user_indexes to postgres_ai_mon;
10298
grantselecton pg_index to postgres_ai_mon;
10399

104-
-- Create a public view for pg_statistic access (required for bloatmetrics on user schemas)
100+
-- Create a public view for pg_statistic access (optional, for bloatanalysis)
105101
createviewpublic.pg_statisticas
106102
select
107103
n.nspnameas schemaname,
@@ -116,11 +112,29 @@ join pg_namespace n on n.oid = c.relnamespace
116112
join pg_attribute aona.attrelid=s.starelidanda.attnum=s.staattnum
117113
wherea.attnum>0and nota.attisdropped;
118114

119-
grantselectonpublic.pg_statistic topg_monitor;
115+
grantselectonpublic.pg_statistic topostgres_ai_mon;
120116
alteruser postgres_ai_monset search_path="$user", public, pg_catalog;
121117
commit;
122118
```
123119

120+
###Optional permissions to analyze risks of certain performance cliffs
121+
122+
For RDS Postgres and Aurora:
123+
124+
```sql
125+
create extension if not exists rds_tools;
126+
grant executeon functionrds_tools.pg_ls_multixactdir() to postgres_ai_mon;
127+
```
128+
129+
For self-managed Postgres:
130+
131+
```sql
132+
grant executeon function pg_stat_file(text) to postgres_ai_mon;
133+
grant executeon function pg_stat_file(text,boolean) to postgres_ai_mon;
134+
grant executeon function pg_ls_dir(text) to postgres_ai_mon;
135+
grant executeon function pg_ls_dir(text,boolean,boolean) to postgres_ai_mon;
136+
```
137+
124138
**One command setup:**
125139

126140
```bash

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp