frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pglocks.org

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

Comments

whilenot-dev•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
I agree, it is not so straightforward to find out.
braiamp•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
Very practical! Locking is one of the things that can really bite when doing migrations.

Television is 100 years old today

https://diamondgeezer.blogspot.com/2026/01/tv100.html
303•qassiov•6h ago•93 comments

The Hidden Engineering of Runways

https://practical.engineering/blog/2026/1/20/the-hidden-engineering-of-runways
36•crescit_eundo•6d ago•1 comments

JuiceSSH – Give me my pro features back

https://nproject.io/blog/juicessh-give-me-back-my-pro-features/
129•jandeboevrie•3h ago•53 comments

Dithering – Part 2: The Ordered Dithering

https://visualrambling.space/dithering-part-2/
50•ChrisArchitect•1h ago•5 comments

RIP Low-Code 2014-2025

https://www.zackliscio.com/posts/rip-low-code-2014-2025/
33•zackliscio•5h ago•10 comments

Show HN: TetrisBench – Gemini Flash reaches 66% win rate on Tetris against Opus

https://tetrisbench.com/tetrisbench/
38•ykhli•2h ago•14 comments

Qwen3-Max-Thinking

https://qwen.ai/blog?id=qwen3-max-thinking
366•vinhnx•5h ago•314 comments

Fedora Asahi Remix is now working on Apple M3

https://bsky.app/profile/did:plc:okydh7e54e2nok65kjxdklvd/post/3mdd55paffk2o
307•todsacerdoti•3h ago•104 comments

ChatGPT Containers can now run bash, pip/npm install packages and download files

https://simonwillison.net/2026/Jan/26/chatgpt-containers/
28•simonw•1h ago•10 comments

MapLibre Tile: a modern and efficient vector tile format

https://maplibre.org/news/2026-01-23-mlt-release/
358•todsacerdoti•10h ago•70 comments

Find 'Abbey Road when type 'Beatles abbey rd': Fuzzy/Semantic search in Postgres

https://rendiment.io/postgresql/2026/01/21/pgtrgm-pgvector-music.html
54•nethalo•5d ago•13 comments

When AI 'builds a browser,' check the repo before believing the hype

https://www.theregister.com/2026/01/26/cursor_opinion/
125•CrankyBear•2h ago•49 comments

Not all Chess960 positions are equally complex

https://arxiv.org/abs/2512.14319
35•MaysonL•3d ago•13 comments

Google Books removed all search functions for any books with previews

https://old.reddit.com/r/google/comments/1qn1hk1/google_has_seemingly_entirely_removed_search/
119•adamnemecek•3h ago•42 comments

Google AI Overviews cite YouTube more than any medical site for health queries

https://www.theguardian.com/technology/2026/jan/24/google-ai-overviews-youtube-medical-citations-...
304•bookofjoe•6h ago•163 comments

The mountain that weighed the Earth

https://signoregalilei.com/2026/01/18/the-mountain-that-weighed-the-earth/
61•surprisetalk•4h ago•9 comments

Things I've learned in my 10 years as an engineering manager

https://www.jampa.dev/p/lessons-learned-after-10-years-as
482•jampa•5d ago•125 comments

Show HN: Ourguide – OS wide task guidance system that shows you where to click

https://ourguide.ai
5•eshaangulati•2h ago•1 comments

San Francisco Graffiti

https://walzr.com/sf-graffiti
106•walz•11h ago•110 comments

OpenFlexure Microscope

https://openflexure.org/projects/microscope/
18•o4c•5d ago•3 comments

OSS ChatGPT WebUI – 530 Models, MCP, Tools, Gemini RAG, Image/Audio Gen

https://llmspy.org/docs/v3
96•mythz•6h ago•22 comments

The Holy Grail of Linux Binary Compatibility: Musl and Dlopen

https://github.com/quaadgras/graphics.gd/discussions/242
196•Splizard•13h ago•153 comments

What "The Best" Looks Like

https://www.kuril.in/blog/what-the-best-looks-like/
84•akurilin•5h ago•39 comments

The browser is the sandbox

https://simonwillison.net/2026/Jan/25/the-browser-is-the-sandbox/
314•enos_feedler•15h ago•165 comments

Show HN: Only 1 LLM can fly a drone

https://github.com/kxzk/snapbench
116•beigebrucewayne•10h ago•71 comments

Notice of Collective Action Lawsuit Against Workday, INC

https://workdaycase.com
66•mooreds•2h ago•17 comments

There is an AI code review bubble

https://www.greptile.com/blog/ai-code-review-bubble
85•dakshgupta•5h ago•65 comments

Exactitude in Science – Borges (1946) [pdf]

https://kwarc.info/teaching/TDM/Borges.pdf
72•jxmorris12•6h ago•24 comments

Text Is King

https://www.experimental-history.com/p/text-is-king
143•zdw•5d ago•66 comments

France Aiming to Replace Zoom, Google Meet, Microsoft Teams, etc.

https://twitter.com/lellouchenico/status/2015775970330882319
374•bwb•4h ago•319 comments