<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pg_am on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/pg_am/</link><description>Recent content in Pg_am on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Tue, 31 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/pg_am/index.xml" rel="self" type="application/rss+xml"/><item><title>Find PostgreSQL Index Bloat and Wasted Space</title><link>https://www.postgresscripts.com/post/find-postgresql-index-bloat-and-wasted-space/</link><pubDate>Tue, 31 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/find-postgresql-index-bloat-and-wasted-space/</guid><description>
&lt;h2 id="how-to-find-index-bloat-and-wasted-space-in-postgresql"&gt;How to Find Index Bloat and Wasted Space in PostgreSQL&lt;/h2&gt;
&lt;p&gt;Just like tables, PostgreSQL indexes can become bloated over time. When rows are updated or deleted, the old index entries are not removed immediately. They stay in the index as dead entries, wasting space and slowing down index scans.&lt;/p&gt;
&lt;p&gt;B-tree indexes are the most common type in PostgreSQL and the most prone to bloat. This query estimates how much space is wasted in each B-tree index, so you can decide which ones need to be rebuilt.&lt;/p&gt;</description></item></channel></rss>