Skip to content

Commit

Permalink
Fixed database_xid_age.sql so it doesn't break due to RDS permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn Weaver committed Jan 15, 2016
1 parent 809b579 commit 8d91779
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 0 additions & 8 deletions bloat/table_bloat_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,3 @@ FROM bloat_data
WHERE ( pct_bloat >= 50 AND mb_bloat >= 10 )
OR ( pct_bloat >= 25 AND mb_bloat >= 1000 )
ORDER BY pct_bloat DESC;








3 changes: 1 addition & 2 deletions vacuum/database_xid_age.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ with datage as (
select datname, age(datfrozenxid) as xid_age,
round(pg_database_size(oid)/(128*1024::numeric),1) as gb_size
from pg_database
where datname not in ('rdsadmin') -- no perms to examine this one (AWS)
),
av_max_age as (
select setting::numeric as max_age from pg_settings where name = 'autovacuum_freeze_max_age'
Expand All @@ -19,5 +20,3 @@ WHERE ((av_wrap_pct >= 75 or shutdown_pct > 50
and gb_size > 1))
or (av_wrap_pct > 100 or shutdown_pct > 80)
order by xid_age desc;


0 comments on commit 8d91779

Please sign in to comment.