|
1 | 1 | package f004 |
2 | 2 |
|
3 | | -const MSG_NO_RECOMMENDATIONS string = "All good, no recommendations here. \n" |
4 | | -const MSG_TOTAL_BLOAT_EXCESS_CONCLUSION string = "[P1] Total table (heap) bloat estimation is %s, it is %.2f%% of overall tables size and %.2f%% of the DB size. " + |
5 | | - "So removing the table bloat can help to reduce the total database size to ~%s and to increase the free disk space by %s. " + |
6 | | - "Notice that this is only an estimation, sometimes it may be significantly off. Total size of tables is %.2f times bigger than it could be. \n" |
7 | | -const MSG_TOTAL_BLOAT_LOW_CONCLUSION string = "The total table (heap) bloat estimate is quite low, just ~%.2f%% (~%s). Hooray! Keep watching it though. \n" |
8 | | -const MSG_BLOAT_CRITICAL_RECOMMENDATION string = "[P1] Reduce and prevent high level of table bloat: \n" + |
9 | | - " - tune autovacuum: consider more aggressive autovacuum settings (See F001) \n" + |
10 | | - " - reduce table bloat using one of the approaches mentioned below. \n" |
11 | | -const MSG_BLOAT_WARNING_RECOMMENDATION string = "[P2] To resolve the table bloat issue, do both of the following actions: \n" + |
12 | | - " - to prevent high level of bloat in the future, tune autovacuum: consider more aggressive autovacuum settings (see F001); \n" + |
13 | | - " - get rid of current table bloat using one of the approaches mentioned below. \n" |
| 3 | +const MSG_NO_RECOMMENDATIONS string = "All good 👍\n" |
| 4 | +const MSG_TOTAL_BLOAT_EXCESS_CONCLUSION string = "[P1] Total table (heap) bloat estimation is ~%s, it is %.2f%% of the overall size of all tables and %.2f%% of the DB size. " + |
| 5 | + "Removing the table bloat will reduce the total DB size down to ~%s. Free disk space will be increased by ~%s. " + |
| 6 | + "Total size of tables is %.2f times bigger than it could be. " + |
| 7 | + "Notice that this is only an estimation, sometimes it may be significantly off.\n" |
| 8 | +const MSG_TOTAL_BLOAT_LOW_CONCLUSION string = "The estimated table (heap) bloat in this DB is low, just ~%.2f%% (~%s). No action is needed now. Keep watching it though.\n" |
| 9 | +const MSG_BLOAT_CRITICAL_RECOMMENDATION string = "[P1] Reduce and prevent the high level of table bloat:\n" + |
| 10 | + " - to prevent a high level of bloat in the future, tune autovacuum: consider more aggressive autovacuum settings (see F001);\n" + |
| 11 | + " - eliminate or reduce the current table bloat using one of the approaches listed below.\n" |
| 12 | +const MSG_BLOAT_WARNING_RECOMMENDATION string = "[P2] Consider the following:\n" + |
| 13 | + " - to prevent a high level of bloat in the future, tune autovacuum: consider more aggressive autovacuum settings (see F001);\n" + |
| 14 | + " - eliminate or reduce the current table bloat using one of the approaches listed below.\n" |
14 | 15 | const MSG_BLOAT_GENERAL_RECOMMENDATION_1 string = "If you want to get exact bloat numbers, clone the database, get table sizes, then apply " + |
15 | | - "`VACUUM FULL` and get new table sizes. This will give the most reliable numbers. \n" |
16 | | -const MSG_BLOAT_GENERAL_RECOMMENDATION_2 string = "To reduce the table bloat, consider using one of the following: \n" + |
17 | | - " - [`VACUUM FULL`](https://www.postgresql.org/docs/current/sql-vacuum.html) (:warning: requires downtime / maintenance window), \n" + |
18 | | - " - one of the tools reducing the bloat online, without interrupting the operations: \n" + |
19 | | - " - [pg_repack](https://github.com/reorg/pg_repack), \n" + |
20 | | - " - [pg_squeeze](https://github.com/reorg/pg_repack), \n" + |
21 | | - " - [pgcompacttable](https://github.com/dataegret/pgcompacttable). \n" |
22 | | -const MSG_BLOAT_PX_RECOMMENDATION string = "Read more on this topic: \n" + |
23 | | - " - [Bloat estimation for tables](http://blog.ioguix.net/postgresql/2014/09/10/Bloat-estimation-for-tables.html) (2014, ioguix) \n" + |
| 16 | + "database-wide `VACUUM FULL` (it eliminate all the bloat), and get new table sizes. Then compare old and new numbers.\n" |
| 17 | +const MSG_BLOAT_GENERAL_RECOMMENDATION_2 string = "To reduce the table bloat, consider one of the following approaches:\n" + |
| 18 | + " - [`VACUUM FULL`](https://www.postgresql.org/docs/current/sql-vacuum.html) (:warning: requires downtime / maintenance window),\n" + |
| 19 | + " - one of the tools reducing the bloat online, without interrupting the operations:\n" + |
| 20 | + " - [pg_repack](https://github.com/reorg/pg_repack),\n" + |
| 21 | + " - [pg_squeeze](https://github.com/cybertec-postgresql/pg_squeeze),\n" + |
| 22 | + " - [pgcompacttable](https://github.com/dataegret/pgcompacttable).\n" |
| 23 | +const MSG_BLOAT_PX_RECOMMENDATION string = "Read more on this topic:\n" + |
| 24 | + " - [Bloat estimation for tables](http://blog.ioguix.net/postgresql/2014/09/10/Bloat-estimation-for-tables.html) (2014, ioguix)\n" + |
24 | 25 | " - [Show database bloat](https://wiki.postgresql.org/wiki/Show_database_bloat) (PostgreSQL wiki)\n" + |
25 | | - " - [PostgreSQL Bloat: origins, monitoring and managing](https://www.compose.com/articles/postgresql-bloat-origins-monitoring-and-managing/) (2016, Compose) \n" + |
26 | | - " - [Dealing with significant Postgres database bloat — what are your options?](https://medium.com/compass-true-north/dealing-with-significant-postgres-database-bloat-what-are-your-options-a6c1814a03a5) (2018, Compass) \n" + |
27 | | - " - [Postgres database bloat analysis](https://about.gitlab.com/handbook/engineering/infrastructure/blueprint/201901-postgres-bloat/) (2019, GitLab) \n" |
28 | | -const MSG_BLOAT_WARNING_CONCLUSION_1 string = "[P2] There is %d table with size > 1 MiB and table bloat estimate >= %.0f%% and < %.0f%%: \n%s \n" |
| 26 | + " - [PostgreSQL Bloat: origins, monitoring and managing](https://www.compose.com/articles/postgresql-bloat-origins-monitoring-and-managing/) (2016, Compose)\n" + |
| 27 | + " - [Dealing with significant Postgres database bloat — what are your options?](https://medium.com/compass-true-north/dealing-with-significant-postgres-database-bloat-what-are-your-options-a6c1814a03a5) (2018, Compass)\n" + |
| 28 | + " - [Postgres database bloat analysis](https://about.gitlab.com/handbook/engineering/infrastructure/blueprint/201901-postgres-bloat/) (2019, GitLab)\n" |
| 29 | +const MSG_BLOAT_WARNING_CONCLUSION_1 string = "[P2] There is %d table with size > 1 MiB and table bloat estimate >= %.0f%% and < %.0f%%: \n%s\n" |
29 | 30 | const MSG_BLOAT_CRITICAL_CONCLUSION_1 string = "[P1] The following %d table has significant size (>1 MiB) and bloat estimate > %.0f%%: \n%s \n" |
30 | 31 | const MSG_BLOAT_WARNING_CONCLUSION_N string = "[P2] There are %d tables with size > 1 MiB and table bloat estimate >= %.0f%% and < %.0f%%: \n%s \n" |
31 | 32 | const MSG_BLOAT_CRITICAL_CONCLUSION_N string = "[P1] The following %d tables have significant size (>1 MiB) and bloat estimate > %.0f%%: \n%s \n" |
|
0 commit comments