<commit_before># RDS PostgreSQL Support Scripts


[<img src="https://wiki.postgresql.org/images/a/a4/PostgreSQL_logo.3colors.svg" align="right"  width="100">](https://www.postgresql.org/)


## SQL Scripts: 

* [List ROLES (i.e. users and groups)](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-roles.sql) 
* [List pg_stat_actitivy roles / showing the status of each connection](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-sessions.sql)
* [List tables with dead tuples](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-with-dead-tuples.sql)
* [List tables and its ages](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-age.sql)
* [List sessions that are blocking others](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-sessions-blocking-others.sql) 
* [List tables and its bloat ratio](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-bloated.sql)
* [List indexes and its bloat ratio](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-btree-bloat.sql) 

## Shell scripts:

* [Catalog tables diagnostic script](https://github.com/awslabs/rds-support-tools/blob/master/postgres/diag/shell/postgresql-diagnostics.sh)

## RDS PostgreSQL public docs:

* [PostgreSQL on Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html)
* [Common DBA Tasks for PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html)
<commit_msg>Adding more useful tools, documents and important references<commit_after># RDS PostgreSQL Support Scripts


[<img src="https://wiki.postgresql.org/images/a/a4/PostgreSQL_logo.3colors.svg" align="right"  width="100">](https://www.postgresql.org/)


## SQL Scripts: 

* [List ROLES (i.e. users and groups)](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-roles.sql) 
* [List pg_stat_actitivy roles / showing the status of each connection](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-sessions.sql)
* [List tables with dead tuples](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-with-dead-tuples.sql)
* [List tables and its ages](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-age.sql)
* [List sessions that are blocking others](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-sessions-blocking-others.sql) 
* [List tables and its bloat ratio](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-tables-bloated.sql)
* [List indexes and its bloat ratio](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/list-btree-bloat.sql) 
* [Top30 tables with low HOT updates ](https://raw.githubusercontent.com/awslabs/rds-support-tools/master/postgres/diag/sql/top30-tables-with-low-hotupdates.sql)
* [Set of scripts for periodically collecing activities (queries and objects stats](https://github.com/awslabs/rds-support-tools/tree/master/postgres/diag/stats_snapshot)

## PostgreSQL Happiness hints:

* [https://ardentperf.com/happiness-hints/](https://ardentperf.com/happiness-hints/)


## More tools:

* [pgBadger / Postgres log parser and report generator](https://github.com/darold/pgbadger)
* [pg-collector](https://github.com/awslabs/pg-collector)
* [AWS PostgreSQL JDBC](https://github.com/awslabs/aws-postgresql-jdbc/)
* [Stats Analyzer](https://github.com/samimseih/statsanalyzer/)
* [ora2pg](https://github.com/darold/ora2pg)
* [pg_partman](https://github.com/pgpartman/pg_partman)
* [pg_cron](https://github.com/citusdata/pg_cron)

## RDS PostgreSQL public docs:

* [PostgreSQL on Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html)
* [Common DBA Tasks for PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html)

## Connection poolers:

* [pgBouncer](http://www.pgbouncer.org/)
* [RDS Proxy](https://aws.amazon.com/rds/proxy/)

## Other scripts:

* [Catalog tables diagnostic script](https://github.com/awslabs/rds-support-tools/blob/master/postgres/diag/shell/postgresql-diagnostics.sh)
{'fraction_non_alphanumeric': 0.155902004454343, 'fraction_numerical': 0.0035634743875278397, 'mean_word_length': 5.3342736248236955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 36, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3697338', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1569, 'n_words': 198}