Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Revealing the details of how OpenAI agents hacked Hugging Face (swarmtraces.org)
    292comments
  2. A single function Jev-like wrapper for LLMs, including vision models (allanrbo.blogspot.com)
    17comments
  3. We're gonna need a lot more mathematicians (terrytao.wordpress.com)
    153comments
  4. Plan mode is dead (aymannadeem.com)
    297comments
  5. Ollaya – Ollama for open-source, Jev-style decision models (ollaya.dev)
    117comments
  6. Is your Postgres migration safe or not safe? (safenotsafe.dev)
    5comments
  7. Show HN: Jev Plays Pokémon Red (jev-pokemon.vercel.app)
    84comments
  8. What even is an OS now? (sockpuppet.org)
    281comments
  9. The Murky History of Soviet-Born Tetris (mitpress.mit.edu)
    12comments
  10. Floci: Locally emulating any cloud service (floci.io)
    —discuss
  11. Jury finds Facebook liable for deceiving users in Cambridge Analytica case (cbsnews.com)
    48comments
  12. Gravity seems holographic. What does that mean for reality? (quantamagazine.org)
    170comments
  13. Scientists build most accurate atomic clock (phys.org)
    3comments
  14. 16GB iPod Nano 3G Upgrade (tuckerosman.com)
    1comments
  15. Ask HN: Who's still keeping a DOS machine up because the business depends on it?
    108comments
  16. Fourier Analysis: Drawing Llamas with Circles (adekau.github.io)
    2comments
  17. Postgres SELECT DISTINCT Does Not Scale (dbos.dev)
    22comments
  18. Excel now supports multiple values in a single cell (techcommunity.microsoft.com)
    136comments
  19. HomelabFest will be in St. Louis in September 2027 (homelabfest.org)
    15comments
  20. One Piece of Flock Camera Data Put This Innocent Woman in Jail for 13 Days (jezebel.com)
    75comments
  21. First Principles Thinking (sunilsadasivan.com)
    112comments
  22. Lab on a Contact Lens Can Measure Stress Through Serotonin (ieee.org)
    11comments
  23. I wrote a ray tracer in Brainfuck (epestr.com)
    17comments
  24. A new world airport and its baggage (computer.rip)
    2comments
  25. Show HN: Hacker Atlas - A map of what Hacker News talks about (hackeratlas.com)
    20comments
  26. Remembering Johannes Doerfert (llvm.org)
    2comments
  27. U.S. appeals court upholds designation of Anthropic as supply chain risk (cnbc.com)
    766comments
  28. Alberta's image as world's only rat-free region shattered by discovery of rat (theguardian.com)
    14comments
  29. From Thin Air to Bootable Images: The Tine Build System (amutable.com)
    —discuss
  30. Microsoft abandons personal AI chatbot race with Copilot reboot (bloomberg.com)
    117comments

Is your Postgres migration safe or not safe?

20 pointsby 2h agosafenotsafe.dev
5 comments
50m agoHN ↗

Thing that bit me most wasn't the DDL itself, it was lock queuing. An ADD COLUMN is instant but if it waits behind a long read, every query behind it piles up too. Lock_timeout plus retry saved us more than any clever migration tool.

18m agoHN ↗

Author here: Adding some context. I led the Postgres platform team (2019-23) at Cloudflare and we were supporting 170+ growing product teams. One of the constant asks is schema migration review. We published a lot of best practices, added CI checks however, it was still hard to catch. Also, I tried to explain the internals of how the locking (rewrite) works, but I realized most of the devs just want the answer - Is it safe or not safe to run?

Not sure if it rings a bell, the name is a reference to the Silicon Valley Jian Yang's hot dog or not hot dog app.

Also, I understand the decision of safe vs not-safe depends heavily on data/histogram and edge cases, but still quite a lot of low-hanging issues can be easily caught with a deterministic rule engine. So I ported pg_savior[1] and used sql parser from libpg-query-node[2] which compiles as WASM, so it entirely runs on the browser. No telemetry, no login. Source attached [3]

[1] https://github.com/viggy28/pg_savior [2] https://github.com/constructive-io/libpg-query-node [3] https://github.com/viggy28/safe-not-safe

10m agoHN ↗

Wow, great idea!

It's not immediately clear from the README, but is it easy to run with multiple profiles like "backwards-compatible", "revertable" (both data and schema) and "destructive" for that final clean-up in multi-staged no-downtime migrations? Basically common subsets of "safe-ness" of the schema migration queries.

I imagine it can be tuned, but I'd love this for all my projects.

And since I am currently on a project doing MS SQL (gasp), that'd be cool too ;)

I am familiar with an "is it a hot dog" app from back in the day, bit would have never made the connection :)

14m agoHN ↗

really like the browser-only approach here - catching the obvious migration risks locally before they ever reach CI feels super useful