<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>postgresql on Ikoma's Blog</title><link>https://blog.yusukeikoma.com/tags/postgresql/</link><description>Recent content in postgresql on Ikoma's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 30 Oct 2026 17:00:00 +0900</lastBuildDate><atom:link href="https://blog.yusukeikoma.com/tags/postgresql/index.xml" rel="self" type="application/rss+xml"/><item><title>Avoiding a PostgreSQL DROP TABLE deadlock by taking LOCK TABLE NOWAIT in a Flyway beforeEachMigrate callback</title><link>https://blog.yusukeikoma.com/posts/flyway-drop-table-deadlock-lock-nowait/</link><pubDate>Fri, 30 Oct 2026 17:00:00 +0900</pubDate><guid>https://blog.yusukeikoma.com/posts/flyway-drop-table-deadlock-lock-nowait/</guid><description>A migration that only dropped an old table deadlocked in production twice and rolled back. DROP TABLE also takes the strongest lock on the tables its foreign keys reference, and a running worker read those tables in the opposite order. After comparing lock_timeout and plain reruns, I left the applied migration untouched and took all the needed locks up front with NOWAIT in a Flyway beforeEachMigrate callback.</description></item><item><title>Sorting Cloudflare Containers left failed after a mass boot into recovery or stop by waiting work</title><link>https://blog.yusukeikoma.com/posts/cloudflare-containers-start-failures/</link><pubDate>Fri, 23 Oct 2026 17:00:00 +0900</pubDate><guid>https://blog.yusukeikoma.com/posts/cloudflare-containers-start-failures/</guid><description>A batch of containers booted all at once, their start deadlines expired, and many failed. Auto-recovery only fires when work is waiting, so it skipped them and the failures stayed. This post covers the causes and how failed boots are now split into waiting work, leftover running work, and nothing at all, compared with Kubernetes CrashLoopBackOff.</description></item><item><title>Preventing Lost Updates on Full-Text Saves with a Line-Level 3-Way Merge</title><link>https://blog.yusukeikoma.com/posts/disjoint-line-edits-survive-overlaps-keep-current/</link><pubDate>Fri, 09 Oct 2026 12:40:00 +0900</pubDate><guid>https://blog.yusukeikoma.com/posts/disjoint-line-edits-survive-overlaps-keep-current/</guid><description>When writers save by replacing a whole document, last-write-wins causes lost updates, and an optimistic-locking conflict error pushes the merge onto every caller. This post does a line-level 3-way merge on the server, using an immutable base snapshot and SELECT &amp;hellip; FOR UPDATE.</description></item><item><title>Testing ON CONFLICT and SKIP LOCKED Takes a Real PostgreSQL</title><link>https://blog.yusukeikoma.com/posts/on-conflict-skip-locked-need-real-postgres/</link><pubDate>Wed, 08 Jul 2026 21:30:00 +0900</pubDate><guid>https://blog.yusukeikoma.com/posts/on-conflict-skip-locked-need-real-postgres/</guid><description>In a backend that writes SQL by hand, retry idempotency and double-claim prevention live inside ON CONFLICT and FOR UPDATE SKIP LOCKED, where a mocked database never looks. This post starts the production PostgreSQL version with testcontainers, applies the real migrations, isolates tests with TRUNCATE, and splits pytest into unit and integration lanes in CI.</description></item></channel></rss>