Postgres_get_av_diag() is a function available in Amazon RDS for PostgreSQL used for monitoring autovacuum.Autovacuum performs a special purpose operation called freezing to prevent transaction ID (XID) wraparound.Autovacuum can lag for various reasons, such as long-running transactions.postgres_get_av_diag() identifies blockers beyond the adaptive autovacuum threshold.It prevents premature alerts and adapts to higher custom settings.A Python-based Lambda function uses postgres_get_av_diag() to identify and report aggressive autovacuum blockers.It also logs the results to CloudWatch and sends email alerts using Amazon Simple Email Service when blocks are detected.Amazon EventBridge schedules periodic execution of the Lambda function.This monitoring solution can mitigate the risk of transaction ID wraparound and prevent downtime.Postgres_get_av_diag() function is supported in Amazon RDS for PostgreSQL version 17.1 and higher.