forked from keithf4/pg_bloat_check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG
61 lines (40 loc) · 4.67 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
2.3.4
- Fixed script output to apply the fillfactor settings when any filtering options are set. Fillfactor was being accounted for in the text output values, but not in the actual calculation of the output, which caused objects to be output in the bloat list when they should not have been.
- Additional syntax fixes so debug output should work in python 3.
2.3.3
- Fix all print syntax so script works in python 3.
2.3.2
- Do not rely on OID from pg_class to perform scanning operations anymore. Could possibly change mid-run without the object name changing and cause script failure.
2.3.1
- Fixed undefined variable error when using wasted space & wasted percentage options in the --exclude_object_file file
2.3.0
- Added --rebuild_index argument. This generates SQL statement blocks that can be used to rebuild indexes with minimal impact on database locks.
- It does not run the statements it generates, it only outputs them to STDOUT.
- Handles primary keys & unique constraints. Unique constraints are rebuilt as unique indexes. They are technically the same under the hood as far as PostgreSQL is concerned and having them as an index makes them easier to rebuild in the future since they require fewer locks.
- CONCURRENTLY and ANALYZE statements require no locks on the tables involved. All ALTER TABLE statements require an exclusive lock on the table, so monitor locking carefully on those steps.
- Allow script to work with non-release versions of PostgreSQL (ex 9.6beta2).
2.2.0
- Account for fillfactor settings in both tables and indexes when determining wasted space. This will likely cause an expected 10% drop in most index bloat reported (if fillfactor hasn't been adjusted manually).
- The "simple" output mode will automatically account for the fillfactor when outputing the wasted space values. For dict & json output, the original raw values of all statistics are given along with that object's fillfactor and relpage count so it can be calculated manually.
- Added new "fillfactor" & "relpages" columns to bloat statistics tables. Run --create_stats_table again to recreate the table with the new, required columns. Note this will wipe out any data contained in the stats table so if you need to preserve it, do so before updating script to this version.
- Added new --noanalyze option. Accounting for fillfactor requires an accurate page count estimate for each object, so it is now analyzed before scanning for bloat. This will cause this script to take slightly longer, but provide more accurate bloat statistics. You can set this option to skip the analyze. However, unless a recent analyze was done, this may cause the bloat report to be less accurate.
- pgstattuple does not currently support BRIN indexes. Excluded for now (Pull Request #6).
- Fixed mismatch in json/dict output. It was giving the dead_tuple_percent value in the free_percent key (Pull Request #6).
2.1.1
- Improve backward compatibility for PostgreSQL versions older than 9.3 (pg_index.indislive did not exist before then) (Github Issue #5)
2.1.0
- Fixed --bloat_schema & --pgstattuple_schema options so they actually work (Github Issue #4)
- More fine grained filtering using --exclude_object_file. Each line in the file is now a CSV entry that can provide additional filtering per object in addition to -s, -p & -z. See README for examples (Github Issue #3).
- Added json & jsonpretty --format modes.
- Changed dict --format mode to just output an unparsed dictionary blob. Previously each object was separated with a return, but this made it more difficult to actually use as a dictionary object. If you need a human readable format of the raw details, use --format=jsonpretty
- Check for object existence again before scanning. Avoids issues during long run times with objects that have been dropped since the initial object list was created.
- If an index is a primary key, the objecttype column in the bloat statistics table will now be "index_pk" to distinguish them from just a normal index.
- The --create_stats_table option will now attempt to drop the tables it creates first before creating them. Will allow any future changes to the stats table to be implemented easier.
- Changed --norescan option to --noscan for simplicity.
2.0.2
- Skip over temp tables and indexes that are marked as dropped (Github Issue #2).
2.0.1
- Skip over GIN indexes since there's no current way to find bloat with them in pgstattuple. Looking for contributions to fix support this https://github.com/keithf4/pg_bloat_check/issues/1
2.0.0
- Complete rewrite using pgstattuple contrib module instead of check_postgres.pl query
- See --help for more information and blog post at https://www.keithf4.com/checking-for-postgresql-bloat/