safe-not-safe checks a Postgres migration for locks and rewrites in your browser, and reached 102 Hacker News points ten hours after Show HN
A developer named viggy28 launched safe-not-safe on 25 September 2026, a browser tool that parses a pasted Postgres migration with libpg_query in a WebAssembly worker and flags lock and rewrite risks, with the SQL never leaving the tab. It reached 102 Hacker News points ten hours after Show HN.

Image: viggy28 / safenotsafe.dev
Why it mattersA backend team that ships a Postgres schema change can now paste the SQL into a page before the pull request goes up and see which statements would take a strong lock on a large table, without adding a service, an account, or a build step.
An ALTER TABLE users ADD COLUMN status text DEFAULT 'active' looks the same at three rows and at fifty million, and the difference between them is a table lock the deploy nobody remembered to schedule. A developer publishing under the name viggy28 launched safe-not-safe on 25 September 2026 as a Show HN: paste a Postgres migration into the page, and the tool parses it with libpg_query in a WebAssembly worker and prints a verdict against the size of the table it will run against.
The site tells you what it will do and then does it in one tab. "Your SQL never leaves the browser. No API route, no logs, no account", the footer reads. The verdict banner shows one of a few states (checking, safe, unsafe) and a per-statement problem list explains what each unsafe statement would lock, rewrite or hold, together with the size class it was judged against.
What it checks and how
The page loads libpg_query 17 as a WebAssembly module and runs it in a web worker. Every syntax check happens in the browser after that first download, and the source is available at viggy28/safe-not-safe on GitHub, where the repository was created on 14 August 2026 and had 27 stars and one fork as of 26 September. There is no licence listed on the repository yet.
Two context switches change the answers rather than the tool. A "Rows in target table" selector splits between under 50,000, 50,000 to 5 million, and over 5 million, so a statement that is safe on a small table can be flagged on a big one. A "Tool wraps DDL in a transaction" checkbox lets migrations that run inside a transaction (as Rails, Django and Ecto do by default) be judged separately from statements that run bare. The sample buffers ship two migrations, one deliberately risky and one safe, so a first-time user can see what the tool actually flags before pasting real code.
The scale it reached quickly
The Show HN post appeared on 26 September and reached 102 points about ten hours later. The repository is small, so the interest is on the tool rather than the code: 27 stars, one fork, most recent push at 09:31 UTC on 26 September. A wave on a Show HN is closer to attention than durable adoption, and worth naming as such.
Where this fits in a review
Larger teams have long carried a rule that a migration touching a large table must be reviewed by a database owner, and half the work in that review is running the same handful of checks against the same list of concerning constructs. safe-not-safe is a first pass at that list, in a browser tab, before a pull request is opened. The reviewer still owns the decision. What the tool changes is the friction: the author of a migration can catch the ten most common failure modes themselves, in the time it takes to open a page and paste, and the review starts from a cleaner draft.
For a solo developer or a small team, the tool sits earlier in the loop than the database does. Postgres will not tell you an ALTER TABLE ... ADD COLUMN with a volatile default rewrites the whole table until you run it in production. A page that gives the same warning before the deploy adds a check the database never runs at planning time.
Source
Primary source: viggy28/safe-not-safe on GitHub.
Live tool: safenotsafe.dev.
Discussion: Is your Postgres migration safe or not safe? on Hacker News.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
