GitHub
github.com › keithf4 › pg_bloat_check
GitHub - keithf4/pg_bloat_check: Bloat check script for PostgreSQL · GitHub
pg_bloat_check is a script to provide a bloat report for PostgreSQL tables and/or indexes. It requires at least Python 3 and the pgstattuple contrib module - https://www.postgresql.org/docs/current/static/pgstattuple.html
Starred by 151 users
Forked by 33 users
Languages Python
PostgreSQL
postgresql.org › docs › current › pgstattuple.html
PostgreSQL: Documentation: 18: F.33. pgstattuple — obtain tuple-level statistics
May 14, 2026 - Whereas pgstattuple always performs a full-table scan and returns an exact count of live and dead tuples (and their sizes) and free space, pgstattuple_approx tries to avoid the full-table scan and returns exact dead tuple statistics along with an approximation of the number and size of live tuples and free space.
Blogger
dbadrive.blogspot.com › 2023 › 05 › pgstattuple-for-tuple-level-statistics.html
DBA Drive: pgstattuple - for tuple-level statistics & removing bloat by pg_repack
pgstattuple module/extension provides various functions to obtain tuple-level statistics, however its not installed by default. postgres=#...
Cmu
db.cs.cmu.edu › pgexts-vldb2025 › pgstattuple.html
pgstattuple - PostgreSQL Extension Analysis
You can now start the database ... pgstattuple ============== CREATE EXTENSION ============== running regression test queries ============== test earthdistance ... FAILED 139 ms ====================== 1 of 1 tests failed. ====================== The differences that caused some tests to fail can be viewed in the file "/home/abigalek/pgext-cli-python/postgresq...
PIGSTY
pigsty.io › ext › e › pgstattuple
pgstattuple | PIGSTY
March 12, 2026 - pgstattuple provides functions to obtain tuple-level statistics for tables and indexes, including dead tuple counts and free space metrics.
Tigawa
tigawa.github.io › blog › 2016 › 11 › 23 › pgstattuple
pgstattuple関数の使い方 · For myself tomorrow
November 23, 2016 - select * from pgstattuple('pgbench_accounts') -[ RECORD 1 ]------+--------- table_len | 13434880 tuple_count | 100000 tuple_len | 12100000 tuple_percent | 90.06 dead_tuple_count | 0 dead_tuple_len | 0 dead_tuple_percent | 0 free_space | 188920 free_percent | 1.41
Pgsty
ext.pgsty.com › e › pgstattuple
pgstattuple – PGEXT.CLOUD
March 24, 2026 - pgstattuple provides functions to obtain tuple-level statistics for tables and indexes, including dead tuple counts and free space metrics.
AWS
aws.amazon.com › blogs › database › improve-postgresql-performance-using-the-pgstattuple-extension
Improve PostgreSQL performance using the pgstattuple extension | Amazon Web Services
April 2, 2025 - In this post, we explore the pgstattuple extension in depth; what insights it offers, how to use it to diagnose issues in Amazon Aurora PostgreSQL-Compatible Edition and Amazon Relational Database Service (Amazon RDS) for PostgreSQL, and best practices for harnessing its capabilities.
TigerData
tigerdata.com › learn › how-to-reduce-bloat-in-large-postgresql-tables
How to Reduce Bloat in Large PostgreSQL Tables | Tiger Data
December 11, 2025 - pgstattuple: CREATE EXTENSION pgstattuple; Copy · Once installed, you can use the pgstattuple function to get an overview of a particular table: SELECT * FROM pgstattuple('your_table_name'); Copy · This query will return several key metrics: table_len: Total size of the table/index.
PostgreSQL Wiki
wiki.postgresql.org › wiki › Monitoring
Monitoring - PostgreSQL wiki
pgstattuple can generate statistics for tables and indexes, showing how much space in each table & index is consumed by live tuples, deleted tuples as well as how much unused space is available in each relation. pg_buffercache gives you introspection into Postgres' shared buffers, showing how ...
SourceForge
postgres-xc.sourceforge.net › docs › 1_1 › pgstattuple.html
F.29. pgstattuple
pgstattuple returns a relation's physical length, percentage of "dead" tuples, and other info. This may help users to determine whether vacuum is necessary or not. The argument is the target relation's name (optionally schema-qualified).