frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pglocks.org

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

Comments

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

The Age Verification Trap: Verifying age undermines everyone's data protection

https://spectrum.ieee.org/age-verification
839•oldnetguy•5h ago•697 comments

Ladybird adopts Rust

https://ladybird.org/posts/adopting-rust/
852•adius•8h ago•453 comments

Show HN: PgDog – Scale Postgres without changing the app

https://github.com/pgdogdev/pgdog
95•levkk•4h ago•26 comments

Binance fired employees who found $1.7B in crypto was sent to Iran

https://www.nytimes.com/2026/02/23/technology/binance-employees-iran-firings.html
68•boplicity•39m ago•38 comments

Americans are destroying Flock surveillance cameras

https://techcrunch.com/2026/02/23/americans-are-destroying-flock-surveillance-cameras/
56•mikece•58m ago•9 comments

'Viking' was a job description, not a matter of heredity: Ancient DNA study

https://www.science.org/content/article/viking-was-job-description-not-matter-heredity-massive-an...
76•bookofjoe•2d ago•60 comments

Elsevier shuts down its finance journal citation cartel

https://www.chrisbrunet.com/p/elsevier-shuts-down-its-finance-journal
446•qsi•11h ago•91 comments

Show HN: Sowbot – open-hardware agricultural robot (ROS2, RTK GPS)

https://sowbot.co.uk/
57•Sabrees•4h ago•19 comments

The Lighthouse: How extreme isolation transforms the body and mind

https://www.newscientist.com/article/2231732-the-lighthouse-how-extreme-isolation-transforms-the-...
31•nixass•3d ago•2 comments

A simple web we own

https://rsdoiel.github.io/blog/2026/02/21/a_simple_web_we_own.html
119•speckx•4h ago•74 comments

Sub-$200 Lidar could reshuffle auto sensor economics

https://spectrum.ieee.org/solid-state-lidar-microvision-adas
336•mhb•4d ago•445 comments

Hadrius (YC W23) Is Hiring Designers Who Code

https://www.ycombinator.com/companies/hadrius/jobs/ObynDF9-senior-product-designer
1•calderwoodra•3h ago

Magical Mushroom – Europe's first industrial-scale mycelium packaging producer

https://magicalmushroom.com/index
274•microflash•12h ago•97 comments

The peculiar case of Japanese web design (2022)

https://sabrinas.space
181•montenegrohugo•5h ago•75 comments

Generalized Sequential Probability Ratio Test for Families of Hypotheses [pdf]

https://sites.stat.columbia.edu/jcliu/paper/GSPRT_SQA3.pdf
10•luu•3d ago•0 comments

Yes there is a right way to stack the dishwasher. Here are the 5 rules

https://www.bbc.com/news/articles/cwy89lr3pl4o
6•colinprince•4d ago•6 comments

0 A.D. Release 28: Boiorix

https://play0ad.com/new-release-0-a-d-release-28-boiorix/
301•jonbaer•4d ago•104 comments

Benchmarks for concurrent hash map implementations in Go

https://github.com/puzpuzpuz/go-concurrent-map-bench
47•platzhirsch•1d ago•0 comments

Show HN: Shibuya – A High-Performance WAF in Rust with eBPF and ML Engine

https://ghostklan.com/shibuya.html
8•germainluperto•1h ago•1 comments

ASML unveils EUV light source advance that could yield 50% more chips by 2030

https://www.reuters.com/world/china/asml-unveils-euv-light-source-advance-that-could-yield-50-mor...
79•pieterr•2h ago•15 comments

femtolisp: A lightweight, robust, scheme-like Lisp implementation

https://github.com/JeffBezanson/femtolisp
87•tosh•7h ago•13 comments

Emulating Goto in Scheme with Continuations

https://terezi.pyrope.net/ccgoto/
30•usually•4d ago•11 comments

India's VIP culture is out of control

https://www.economist.com/asia/2026/02/22/indias-vip-culture-is-out-of-control
19•vinni2•38m ago•6 comments

What it means that Ubuntu is using Rust

https://smallcultfollowing.com/babysteps/blog/2026/02/23/ubuntu-rustnation/
67•zdw•2h ago•86 comments

SETI@home: Data Acquisition and Front-End Processing (2025)

https://iopscience.iop.org/article/10.3847/1538-3881/ade5a7
70•tosh•10h ago•14 comments

A lithium-ion breakthrough that could boost range and lower costs

https://www.techradar.com/vehicle-tech/hybrid-electric-vehicles/forget-solid-state-batteries-rese...
10•thelastgallon•55m ago•0 comments

Show HN: AI Timeline – 171 LLMs from Transformer (2017) to GPT-5.3 (2026)

https://llm-timeline.com/
89•ai_bot•10h ago•43 comments

Decided to fly to the US to buy some hard drives

https://old.reddit.com/r/DataHoarder/comments/1rb9ot4/decided_to_fly_to_the_us_to_buy_some_hard_d...
43•HelloUsername•3h ago•24 comments

I built Timeframe, our family e-paper dashboard

https://hawksley.org/2026/02/17/timeframe.html
1450•saeedesmaili•1d ago•340 comments

What Is a Centipawn Advantage?

https://win-vector.com/2026/02/19/what-is-a-centipawn-advantage/
43•jmount•4d ago•18 comments