<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Postgresql on App Coding</title>
    <link>https://appcoding.com/tags/postgresql/</link>
    <description>Recent content in Postgresql on App Coding</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 05 Oct 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://appcoding.com/tags/postgresql/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A Schema Diff That Warns Which Migration Will Lock a 40-Million-Row Table or Lose Data</title>
      <link>https://appcoding.com/a-schema-diff-that-warns-which-migration-will-lock-a-40-million-row-table-or-lose-data/</link>
      <pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://appcoding.com/a-schema-diff-that-warns-which-migration-will-lock-a-40-million-row-table-or-lose-data/</guid>
      <description>&lt;p&gt;The diff in the pull request is one line: &lt;code&gt;ALTER TABLE orders ALTER COLUMN total TYPE bigint;&lt;/code&gt;. It reads like a rounding fix, so the reviewer approves it, and the SQL is correct. On a table with 41 million rows it&amp;rsquo;s also a full rewrite under a lock that stops every read and write until it finishes. A diff shows what changes, never what the change costs.&lt;/p&gt;&#xA;&lt;p&gt;A schema diff worth using would print consequences instead of SQL, in sentences like &amp;ldquo;this rewrites a 41-million-row table and blocks every read and write&amp;rdquo; or &amp;ldquo;the rollback is impossible without a backup&amp;rdquo;. Those sentences depend on three things: the statement, the engine and its version, and the size of the table it lands on. With all three you can post a risk report on every migration pull request. With only the first you have a linter.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Give Every Database Query a Budget and Fail the Build When It Scans Too Much</title>
      <link>https://appcoding.com/give-every-database-query-a-budget-and-fail-the-build-when-it-scans-too-much/</link>
      <pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://appcoding.com/give-every-database-query-a-budget-and-fail-the-build-when-it-scans-too-much/</guid>
      <description>&lt;p&gt;A developer changes a login lookup to &lt;code&gt;WHERE lower(email) = lower($1)&lt;/code&gt; so that sign-in stops being case-sensitive. Every test passes. The btree index on &lt;code&gt;email&lt;/code&gt; can&amp;rsquo;t serve a query that wraps the column in a function, so Postgres reads the whole users table, and on a test database with forty rows that&amp;rsquo;s the cheapest plan anyway. The change ships. A week later someone notices login latency tracking the signup count. The fix is a one-line expression index that would have taken a minute if anything had objected during review.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
