├── .cursor └── rules │ └── sql-style.mdc ├── .github └── workflows │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── init └── generate.sh ├── matviews └── refresh_all.sql ├── misc └── generate_password.sql ├── roles ├── alter_user_with_random_password.psql └── create_user_with_random_password.psql ├── sql ├── 0_node.sql ├── 1_databases.sql ├── 2_table_sizes.sql ├── 3_load_profiles.sql ├── a1_activity.sql ├── b1_table_estimation.sql ├── b2_btree_estimation.sql ├── b3_table_pgstattuple.sql ├── b4_btree_pgstattuple.sql ├── b5_tables_no_stats.sql ├── e1_extensions.sql ├── i1_rare_indexes.sql ├── i2_redundant_indexes.sql ├── i3_non_indexed_fks.sql ├── i4_invalid_indexes.sql ├── i5_indexes_migration.sql ├── l1_lock_trees.sql ├── l2_lock_trees.sql ├── p1_alignment_padding.sql ├── r1_create_user_with_random_password.sql ├── r2_alter_user_with_random_password.sql ├── s1_pg_stat_statements_top_total.sql ├── s2_pg_stat_statements_report.sql ├── t1_tuning.sql ├── v1_vacuum_activity.sql └── v2_autovacuum_progress_and_queue.sql ├── start.psql ├── test └── regression │ ├── 0_node.out │ ├── a1_activity.out │ └── p1_alignment_padding.out └── warmup.psql /.cursor/rules/sql-style.mdc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/.cursor/rules/sql-style.mdc -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .cursor/environment.json 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/README.md -------------------------------------------------------------------------------- /init/generate.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/init/generate.sh -------------------------------------------------------------------------------- /matviews/refresh_all.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/matviews/refresh_all.sql -------------------------------------------------------------------------------- /misc/generate_password.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/misc/generate_password.sql -------------------------------------------------------------------------------- /roles/alter_user_with_random_password.psql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/roles/alter_user_with_random_password.psql -------------------------------------------------------------------------------- /roles/create_user_with_random_password.psql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/roles/create_user_with_random_password.psql -------------------------------------------------------------------------------- /sql/0_node.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/0_node.sql -------------------------------------------------------------------------------- /sql/1_databases.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/1_databases.sql -------------------------------------------------------------------------------- /sql/2_table_sizes.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/2_table_sizes.sql -------------------------------------------------------------------------------- /sql/3_load_profiles.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/3_load_profiles.sql -------------------------------------------------------------------------------- /sql/a1_activity.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/a1_activity.sql -------------------------------------------------------------------------------- /sql/b1_table_estimation.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/b1_table_estimation.sql -------------------------------------------------------------------------------- /sql/b2_btree_estimation.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/b2_btree_estimation.sql -------------------------------------------------------------------------------- /sql/b3_table_pgstattuple.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/b3_table_pgstattuple.sql -------------------------------------------------------------------------------- /sql/b4_btree_pgstattuple.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/b4_btree_pgstattuple.sql -------------------------------------------------------------------------------- /sql/b5_tables_no_stats.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/b5_tables_no_stats.sql -------------------------------------------------------------------------------- /sql/e1_extensions.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/e1_extensions.sql -------------------------------------------------------------------------------- /sql/i1_rare_indexes.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/i1_rare_indexes.sql -------------------------------------------------------------------------------- /sql/i2_redundant_indexes.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/i2_redundant_indexes.sql -------------------------------------------------------------------------------- /sql/i3_non_indexed_fks.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/i3_non_indexed_fks.sql -------------------------------------------------------------------------------- /sql/i4_invalid_indexes.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/i4_invalid_indexes.sql -------------------------------------------------------------------------------- /sql/i5_indexes_migration.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/i5_indexes_migration.sql -------------------------------------------------------------------------------- /sql/l1_lock_trees.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/l1_lock_trees.sql -------------------------------------------------------------------------------- /sql/l2_lock_trees.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/l2_lock_trees.sql -------------------------------------------------------------------------------- /sql/p1_alignment_padding.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/p1_alignment_padding.sql -------------------------------------------------------------------------------- /sql/r1_create_user_with_random_password.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/r1_create_user_with_random_password.sql -------------------------------------------------------------------------------- /sql/r2_alter_user_with_random_password.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/r2_alter_user_with_random_password.sql -------------------------------------------------------------------------------- /sql/s1_pg_stat_statements_top_total.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/s1_pg_stat_statements_top_total.sql -------------------------------------------------------------------------------- /sql/s2_pg_stat_statements_report.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/s2_pg_stat_statements_report.sql -------------------------------------------------------------------------------- /sql/t1_tuning.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/t1_tuning.sql -------------------------------------------------------------------------------- /sql/v1_vacuum_activity.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/v1_vacuum_activity.sql -------------------------------------------------------------------------------- /sql/v2_autovacuum_progress_and_queue.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/sql/v2_autovacuum_progress_and_queue.sql -------------------------------------------------------------------------------- /start.psql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/start.psql -------------------------------------------------------------------------------- /test/regression/0_node.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/test/regression/0_node.out -------------------------------------------------------------------------------- /test/regression/a1_activity.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/test/regression/a1_activity.out -------------------------------------------------------------------------------- /test/regression/p1_alignment_padding.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/test/regression/p1_alignment_padding.out -------------------------------------------------------------------------------- /warmup.psql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikolayS/postgres_dba/HEAD/warmup.psql --------------------------------------------------------------------------------