frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pglocks.org

https://pglocks.org/
80•hnasr•1y ago

Comments

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

Domain expertise has always been the real moat

https://www.brethorsting.com/blog/2026/05/domain-expertise-has-always-been-the-real-moat/
148•aaronbrethorst•2h ago•88 comments

I found a seashell in the middle of the desert

https://github.com/Hawzen/I-found-a-seashell-in-the-middle-of-the-desert
146•Hawzen•1d ago•42 comments

Accenture to acquire Ookla

https://newsroom.accenture.com/news/2026/accenture-to-acquire-ookla-to-strengthen-network-intelli...
208•Garbage•6h ago•102 comments

wolfSSL releases a new product; wolfCOSE a zero alloc C embbedded COSE stack

https://github.com/wolfSSL/wolfCOSE
29•aidangarske•2h ago•1 comments

Zig ELF Linker Improvements Devlog

https://ziglang.org/devlog/2026/#2026-05-30
148•kristoff_it•5h ago•30 comments

Jef Raskin, the Visionary Behind the Mac (2013)

https://lowendmac.com/2013/jef-raskin-the-visionary-behind-the-mac/
43•tylerdane•3h ago•25 comments

Parallel Reconstruction of Lawful TLS Wiretapping

https://remyhax.xyz/posts/reproducing-lawful-tls-wiretapping/
38•jerrythegerbil•3h ago•19 comments

OpenRouter raises $113M Series B

https://openrouter.ai/announcements/series-b
328•freeCandy•5h ago•150 comments

Voxel Space (2017)

https://s-macke.github.io/VoxelSpace/
238•davikr•8h ago•48 comments

Show HN: 500 years of Joseon court omens as an observability dashboard

https://ajin.im/is/building/omen.ops/
64•poppypetalmask•3h ago•8 comments

Dusklight – GC Twilight Princess Decompiled

https://twilitrealm.dev/
42•shepherdjerred•2h ago•4 comments

Microcode inside the Intel 8087 floating-point chip: register exchange

https://www.righto.com/2026/05/microcode-inside-intel-8087-floating.html
77•pwg•5h ago•15 comments

Design Engineering Magazine

https://interfaces.dev/
30•hnhsh•2h ago•4 comments

Openrsync: An implementation of rsync, by the OpenBSD team

https://github.com/kristapsdz/openrsync
299•sph•12h ago•131 comments

Tsplat – Run Gaussian splatting in your terminal

https://github.com/darshanmakwana412/tsplat
17•martianvoid•2d ago•1 comments

Pandoc Templates

https://pandoc-templates.org/
349•ankitg12•13h ago•47 comments

Show HN: Open Envelope – an open schema for defining AI agent teams

https://openenvelope.org/docs/schema/
10•ashconway•2d ago•1 comments

90% of the T Distribution

https://entropicthoughts.com/ninety-percent-of-the-t-distribution
4•ibobev•3d ago•0 comments

Hormuz crisis side effect: a sharp rise in container shipping rates

https://www.lloydslist.com/LL1157327/Hormuz-crisis-side-effect-a-sharp-rise-in-container-shipping...
158•mooreds•4h ago•111 comments

Zig: Build System Reworked

https://ziglang.org/devlog/2026/#2026-05-26
311•tosh•14h ago•202 comments

Werner Herzog in conversation with Paul Cronin (2014)

https://fsgworkinprogress.com/2014/09/26/insignificant-bullets-evil-poachers-and-l-a-culture/
64•Michelangelo11•6h ago•23 comments

Navier-Stokes fluid simulation explained with Godot game engine

https://myzopotamia.dev/navier-stokes-fluid-simulation-explained-with-godot
170•myzek•4d ago•23 comments

It takes two neurons to ride a bicycle (2004)

https://fermatslibrary.com/s/it-takes-two-neurons-to-ride-a-bicycle#email-newsletter
89•malshe•4d ago•42 comments

Leo's first encyclical attacks technological messianism

https://www.economist.com/europe/2026/05/28/leos-first-encyclical-attacks-technological-messianism
156•1vuio0pswjnm7•12h ago•179 comments

IXI's autofocusing lenses are almost ready to replace multifocal glasses

https://www.engadget.com/wearables/ixis-autofocusing-lenses-multifocal-glasses-ces-2026-212608427...
145•amichail•3d ago•64 comments

Shakespeare’s World – I thought this would be simple but

https://knowwhereconsulting.co.uk/blog/shakespeares-world/
12•speckx•4d ago•6 comments

EY Canada published a cybersecurity report and most citations were hallucinated

https://gptzero.me/investigations/ey
259•smartmic•4h ago•115 comments

A disappearing Service Processor (2025)

https://oxide.computer/blog/cosmo-sp
12•mooreds•3h ago•2 comments

What are locusts and what happened to them?

https://explosion-scratch.github.io/locusts/
202•explosion-s•4d ago•49 comments

Show HN: Helios – what plug-in solar could generate for any address in Britain

https://helios.southlondonscientific.com/
108•ruaraidh•12h ago•36 comments