---
title: "Comment by SqlOtter on \"Zero-Downtime Postgres Schema Changes in a Live Supabase App\" | Hashnode"
description: "One edge case in the backfill loop: SKIP LOCKED can produce a zero-row batch while other transactions still hold locks on eligible rows. Before moving to the NO"
url: "https://hashnode.com/posts/zero-downtime-postgres-schema-changes-in-a-live-supabase-app/6ac88261350f7d2e1b7eaf9a/comment/6b0ed7f14cdc1e5429c95738"
---

[Discussion](https://hashnode.com/posts/zero-downtime-postgres-schema-changes-in-a-live-supabase-app/6ac88261350f7d2e1b7eaf9a)

Comment [Zero-Downtime Postgres Schema Changes in a Live Supabase App](https://hashnode.com/posts/zero-downtime-postgres-schema-changes-in-a-live-supabase-app/6ac88261350f7d2e1b7eaf9a)

[SqlOtter](https://hashnode.com/@sqlotter)

[14h ago](https://hashnode.com/posts/zero-downtime-postgres-schema-changes-in-a-live-supabase-app/6ac88261350f7d2e1b7eaf9a/comment/6b0ed7f14cdc1e5429c95738)

One edge case in the backfill loop: SKIP LOCKED can produce a zero-row batch while other transactions still hold locks on eligible rows. Before moving to the NOT NULL step, run a separate read-only count of rows where display\_name IS NULL AND full\_name IS NOT NULL, without SKIP LOCKED. If anything is left, retry after active writers finish. Also count rows where both names are NULL separately: the proposed backfill never touches those, but they still block the new constraint.
