🌐
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.
🌐
Pgxman
pgxman.com › x › pgstattuple
pgstattuple - on pgxman
However, it might be preferable to add those users to the pg_stat_scan_tables role instead. F.33.1. Functions [10]# pgstattuple(regclass) returns record pgstattuple returns a relation's physical length, percentage of "dead" tuples, and other info.
🌐
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
🌐
Percona
percona.com › home › blog › postgresql tuple-level statistics with pgstattuple
PostgreSQL Tuple-Level Statistics With pgstattuple - Percona
October 9, 2023 - Learn how the pgstattuple extension can be used for tuple-level analysis and finding bloated tables or vacuuming candidates.
🌐
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.
Find elsewhere
🌐
Neon
neon.com › docs › extensions › pgstattuple
The pgstattuple extension - Neon Docs
The pgstattuple extension provides a suite of functions to inspect the physical storage of Postgres tables and indexes at a detailed, tuple (row) level. It offers insights into issues like table and i...
🌐
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.
🌐
DEV Community
dev.to › hujan › configure-pgstattuple-3pnf
Configure pgstattuple - DEV Community
August 14, 2025 - pgstattuple is part of PostgreSQL's contrib modules—a collection of officially supported but optional...
🌐
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 ...
🌐
CYBERTEC PostgreSQL
cybertec-postgresql.com › home › detecting table bloat in postgresql
Detecting table bloat in PostgreSQL | CYBERTEC PostgreSQL | Services & Support
April 28, 2026 - Table bloat is somewhat nasty because ... to figure out if a table is bloated or not. The PostgreSQL contrib package provides a package called pgstattuple to diagnose table bloat....
🌐
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).
🌐
OpenSourceDB
opensource-db.com › home › blog › unlocking postgresql’s potential with pgstattuple
Unlocking PostgreSQL’s potential with pgstattuple - OpenSourceDB
August 21, 2024 - Introduction pgstattuple is an open-source utility in PostgreSQL, provided as an extension. It helps manage and clear table bloat, which […]