frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pglocks.org

https://pglocks.org/
80•hnasr•12mo ago

Comments

whilenot-dev•12mo ago
I'm a bit lost here.

Locking is a challenging problem in complex systems. Is this list to be interpreted as a "TODO: get rid of locking conflicts in future releases" or more a "NOTE: be aware there are known conflicts that will not change - find ways to work around them"?

EDIT: Also, is the creation of this list an automated or a manual effort?

tux3•12mo ago
I think this is intended as educational material, not a list of things to fix.

The locks are here by necessity, it is not so easy at all to get rid of them. And even in special cases where it is possible, the complexity you have to introduce is not to be taken lightly...

If even a tenth of these disapppeared, it would be incredible, in a very surprising way.

atombender•12mo ago
The creator looks like a developer and teacher, not a Postgres core team member. So I assume this is for documentation purposes.

I actually like this a lot, as there isn't a single place in the Postgres documentation that lists all the possible locks; it's spread out all over. Having a quick reference for what kinds of commands you'd be blocking with your transaction is valuable.

It's pretty evident that the pages have been programmatically generated, but I'd love know what it's generated from. I think you can derive this information from the documentation, but not sure if you can do it in an automated way without an LLM.

braiamp•12mo ago
> there isn't a single place in the Postgres documentation that lists all the possible locks

Did you read this page? https://www.postgresql.org/docs/current/explicit-locking.htm...

atombender•12mo ago
That's a great page, but it has several issues.

First, it isn't complete; as I said, the locking behaviour is spread out all over the Postgres documentation. For example, that page doesn't list what locks DROP INDEX takes. To find that out, you have to go to the documentation page for that command and read it carefully. In fact, really carefully — the locking behaviour is only documented under the section about CONCURRENTLY.

The page also doesn't list what possible commands are then blocked. Locks interact in subtle (and incorrectly named!) ways that are explained in the tables on that page ("Conflicting lock modes"), so to understand if something will block something else you have to look at the two commands you are curious about and then look at how their locks interact.

gulcin_xata•12mo ago
I agree, it is not so straightforward to find out.
braiamp•12mo ago
These are database locks, which means that depending which arrives first, the later transaction has to wait till the first one finishes to complete. These locks are about SQL commands and which commands can run concurrently with the others. There's a graph here of how that looks like https://pankrat.github.io/2015/django-migrations-without-dow...

Usually for maximum performance (minimum latency, maximum throughput) you want to have operations not lock each other, unless absolutely necessary, in which case you want them to be short.

whilenot-dev•12mo ago
You make it sound like the conflict is just affecting performance and won't result in a deadlock. So it's for performance aware postgres clients/users, and not for postgres developers?
andyferris•12mo ago
It is a guide for developers using postgres as a client, who need to write systems that don't deadlock, are performant and are correct. These are the (rather sharp) tools that postgres provides for doing so (or else you can use e.g. serializable isolation and optimistic concurrency, but in my experience that has too many false positives and bail out rather eagerly, whereas these tools let you be very precise and granular).
mebcitto•12mo ago
Other relevant talks/blogs that I found really useful for understanding Postgres locks are:

* Unlocking the Postgres Lock Manager by Bruce Momjian: https://momjian.us/main/writings/pgsql/locking.pdf

* Anatomy of table-level locks by Gulcin Yildirim Jelinek: https://xata.io/blog/anatomy-of-locks

pasxizeis•12mo ago
Shameless plug: I wrote a tool[1] that executes a given migration against a test database (e.g. in your CI) and reports back what locks it acquired.

The rationale being to have a "lock diagnostics report" commented in your PR's migration file.

It's a prototype and has a few rough edges and missing functionality, but feedback is more than welcome.

[1] https://github.com/agis/pglockanalyze

jononor•12mo ago
Very practical! Locking is one of the things that can really bite when doing migrations.

Kioxia and Dell cram 10 PB into slim 2RU server

https://www.blocksandfiles.com/flash/2026/05/14/kioxia-and-dell-cram-10-pb-into-slim-2ru-server/5...
71•rbanffy•3h ago•44 comments

Windows 9x Subsystem for Linux

https://codeberg.org/hails/wsl9x
137•ibobev•3d ago•56 comments

SANA-WM, a 2.6B open-source world model for 1-minute 720p video

https://nvlabs.github.io/Sana/WM/
261•mjgil•8h ago•104 comments

Accelerando (2005)

https://www.antipope.org/charlie/blog-static/fiction/accelerando/accelerando.html
201•eamag•9h ago•110 comments

Moving away from Tailwind, and learning to structure my CSS

https://jvns.ca/blog/2026/05/15/moving-away-from-tailwind--and-learning-to-structure-my-css-/
325•mpweiher•11h ago•218 comments

Δ-Mem: Efficient Online Memory for Large Language Models

https://arxiv.org/abs/2605.12357
172•44za12•11h ago•44 comments

Fame! A Misunderstanding: A new translation of Albert Camus's complete notebooks

https://lareviewofbooks.org/article/albert-camus-complete-notebooks-ryan-bloom-existentialism-abs...
21•Caiero•2d ago•2 comments

Frontier AI has broken the open CTF format

https://kabir.au/blog/the-ctf-scene-is-dead
298•frays•13h ago•262 comments

A molecule with half-Möbius topology

https://www.science.org/doi/10.1126/science.aea3321
14•bryanrasmussen•4d ago•0 comments

Technofascism

https://third-bit.com/2026/05/15/technofascism/
93•speckx•3h ago•22 comments

Japan runs out of robot wolves in fight against bears

https://www.popsci.com/environment/japan-robot-wolf-army/
28•bookofjoe•1h ago•11 comments

Project Gutenberg – keeps getting better

https://www.gutenberg.org/
1113•JSeiko•1d ago•265 comments

HTML Lists

https://blog.frankmtaylor.com/2026/05/13/you-dont-know-html-lists/
241•speckx•3h ago•47 comments

Show HN: Rocksky – Music scrobbling and discovery on the AT Protocol

https://tangled.org/rocksky.app/rocksky
29•tsiry•3h ago•11 comments

Clusters become personal (like PCs did)

https://aranya.tech/blog/arrival-of-the-personal-cluster
39•druid•3d ago•27 comments

Greek Alphabet Cards

https://labs.randomquark.com/alphabet_cards/
80•ricochet11•9h ago•32 comments

DeepSeek-V4-Flash means LLM steering is interesting again

https://www.seangoedecke.com/steering-vectors/
159•Brajeshwar•5h ago•58 comments

We've made the world too complicated

https://user8.bearblog.dev/the-world-is-too-complicated/
88•James72689•12h ago•98 comments

OpenAI and Government of Malta partner to roll out ChatGPT Plus to all citizens

https://openai.com/index/malta-chatgpt-plus-partnership/
27•bookofjoe•40m ago•18 comments

Futhark by example

https://futhark-lang.org/examples.html
99•tosh•11h ago•26 comments

Kyber (YC W23) Is Hiring a Founding Marketer

https://www.ycombinator.com/companies/kyber/jobs/1rLQAro-founding-marketer-content-community
1•asontha•8h ago

Recreation of the 1956 IPL-I version of the Logic Theorist theorem prover

https://github.com/dmoews/logic-theorist
3•abrax3141•3d ago•1 comments

After 8 years, I rewrote my open-source PyTorch curvature library

https://github.com/noahgolmant/pytorch-hessian-eigenthings
51•noahgolmant•2d ago•1 comments

Accelerate – Embedded language for high-performance array computations

https://github.com/AccelerateHS/accelerate
63•tosh•7h ago•16 comments

My Favorite Bugs: Invalid Surrogate Pairs

https://george.mand.is/2026/05/my-favorite-bugs-invalid-surrogate-pairs/
79•meysamazad•8h ago•40 comments

Nearly 50 Years Later, WKRP in Cincinnati Becomes a Real Radio Station

https://www.openculture.com/2026/05/nearly-50-years-later-wkrp-in-cincinnati-becomes-a-real-radio...
84•bookofjoe•4d ago•53 comments

PART Telescopes – Bringing radio astronomy within reach of rural schools

https://parttelescopes.web.app/
97•openrockets•5h ago•27 comments

I believe there are entire companies right now under AI psychosis

https://twitter.com/mitchellh/status/2055380239711457578
1781•reasonableklout•1d ago•980 comments

Fecal transplants for autism deliver success in clinical trials (2019)

https://refractor.io/adhd-autism/fecal-transplants-for-autism-delivers-success-in-clinical-trials/
253•breve•11h ago•177 comments

Points are a weird and inconsistent unit of measure

https://buttondown.com/hillelwayne/archive/points-are-a-weird-and-inconsistent-unit-of/
58•danborn26•2d ago•54 comments