<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bloat on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/bloat/</link><description>Recent content in Bloat on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Fri, 03 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/bloat/index.xml" rel="self" type="application/rss+xml"/><item><title>Detect Soft Delete Patterns in PostgreSQL</title><link>https://www.postgresscripts.com/post/detect-soft-delete-patterns-in-postgresql/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/detect-soft-delete-patterns-in-postgresql/</guid><description>
&lt;h2 id="detecting-soft-delete-patterns-in-postgresql"&gt;Detecting Soft Delete Patterns in PostgreSQL&lt;/h2&gt;
&lt;p&gt;Soft deletes are a common application pattern. Instead of removing a row with a &lt;code&gt;DELETE&lt;/code&gt; statement, the application marks it as deleted by setting a column — typically &lt;code&gt;deleted_at&lt;/code&gt; — to a non-null timestamp. The row stays in the table forever. The application simply filters it out with a &lt;code&gt;WHERE deleted_at IS NULL&lt;/code&gt; clause.&lt;/p&gt;
&lt;p&gt;This pattern is useful for audit trails, undo functionality, and referential integrity. It is also a significant source of problems for PostgreSQL DBAs who do not know it is in use.&lt;/p&gt;</description></item></channel></rss>