<?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 Kuldeep Pisda</title><link>https://kdpisda.in/tag/postgresql/</link><description>Recent content in postgresql on Kuldeep Pisda</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 25 May 2026 10:00:00 +0530</lastBuildDate><atom:link href="https://kdpisda.in/tag/postgresql/index.xml" rel="self" type="application/rss+xml"/><item><title>Why We Stopped Putting Enums in Postgres</title><link>https://kdpisda.in/stop-putting-enums-in-postgres/</link><pubDate>Mon, 25 May 2026 10:00:00 +0530</pubDate><guid>https://kdpisda.in/stop-putting-enums-in-postgres/</guid><description>&lt;p&gt;Reach for a Postgres &lt;code&gt;ENUM&lt;/code&gt; and it feels like the responsible choice. You&amp;rsquo;ve got a
column that can only be &lt;code&gt;pending&lt;/code&gt;, &lt;code&gt;sent&lt;/code&gt;, or &lt;code&gt;failed&lt;/code&gt;, so you encode that at the
database level, get a compact type, readable &lt;code&gt;\d&lt;/code&gt; output, and a hard guarantee that no
garbage value ever lands in the column. Textbook. I&amp;rsquo;ve shipped plenty of them.&lt;/p&gt;
&lt;p&gt;Then I spent about fifteen months embedded in a multi-tenant AI voice and texting
platform for home-services contractors — an AI receptionist that answers calls, books
jobs into the CRMs those contractors already run on, and drives outbound campaigns. The
codebase moved &lt;em&gt;fast&lt;/em&gt;: on the order of six thousand PRs in eleven months, a migration
runner with per-environment concurrency locks, and enough accumulated schema churn that
the team eventually re-baselined the whole migration history from a production schema
dump. In that environment, native enums quietly became a tax. So on new columns we
stopped using them — plain &lt;code&gt;text&lt;/code&gt;, with the value set validated in the application
layer. Here&amp;rsquo;s the reasoning, because the tradeoff is real and it cuts both ways.&lt;/p&gt;</description></item><item><title>Ambarsthan Bookings: Let the Database Win the Race</title><link>https://kdpisda.in/ambarsthan-concurrent-bookings-in-the-database/</link><pubDate>Sat, 07 Mar 2026 10:00:00 +0530</pubDate><guid>https://kdpisda.in/ambarsthan-concurrent-bookings-in-the-database/</guid><description>&lt;p&gt;In the last chapter I poured the walls between our Celery workloads so a slow transcode could never delay a donor&amp;rsquo;s payment — isolation by named queue, one worker per latency class. That was about &lt;em&gt;fairness&lt;/em&gt; under load: making sure nobody waits behind the wrong thing. This chapter is about the harder cousin of that problem — &lt;em&gt;correctness&lt;/em&gt; under load. Not &amp;ldquo;who goes first,&amp;rdquo; but &amp;ldquo;what happens when two people try to take the exact same thing at the exact same instant, and both of them are right to think it&amp;rsquo;s available.&amp;rdquo;&lt;/p&gt;</description></item></channel></rss>