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.

Unrolling the Codex agent loop

https://openai.com/index/unrolling-the-codex-agent-loop/
59•tosh•1h ago•21 comments

Proof of Corn

https://proofofcorn.com/
253•rocauc•4h ago•187 comments

Gas Town's agent patterns, design bottlenecks, and vibecoding at scale

https://maggieappleton.com/gastown
188•pavel_lishin•5h ago•219 comments

New YC homepage

https://www.ycombinator.com/
39•sarreph•3h ago•14 comments

Banned C++ Features in Chromium

https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md
20•szmarczak•1h ago•3 comments

Microsoft gave FBI set of BitLocker encryption keys to unlock suspects' laptops

https://techcrunch.com/2026/01/23/microsoft-gave-fbi-a-set-of-bitlocker-encryption-keys-to-unlock...
451•bookofjoe•4h ago•318 comments

Mental Models (2018)

https://fs.blog/mental-models/
9•hahahacorn•54m ago•3 comments

TrueVault (YC W14) is hiring a Growth Lead to test different growth channels

https://www.ycombinator.com/companies/truevault/jobs/njvSGDj-growth-lead
1•jason_wang•1h ago

Route leak incident on January 22, 2026

https://blog.cloudflare.com/route-leak-incident-january-22-2026/
85•nomaxx117•4h ago•9 comments

Vargai/SDK – JSX for AI video, declarative programming language for Claude Code

https://varg.ai/sdk
28•alex_varga•1d ago•8 comments

Gold fever, cold, and the true adventures of Jack London in the wild

https://www.smithsonianmag.com/history/gold-fever-deadly-cold-and-amazing-true-adventures-jack-lo...
16•janandonly•5d ago•0 comments

KORG phase8 – Acoustic Synthesizer

https://www.korg.com/us/products/dj/phase8/
145•bpierre•7h ago•78 comments

Notes on the Intel 8086 processor's arithmetic-logic unit

https://www.righto.com/2026/01/notes-on-intel-8086-processors.html
51•elpocko•4h ago•6 comments

Killing the ISP Appliance: An eBPF/XDP Approach to Distributed BNG

https://markgascoyne.co.uk/posts/ebpf-bng/
50•chaz6•4h ago•14 comments

EquipmentShare (YC W15) goes public

https://www.ycombinator.com/blog/congratulations-to-equipmentshare/
6•subsequent•29m ago•3 comments

Booting from a vinyl record (2020)

https://boginjr.com/it/sw/dev/vinyl-boot/
245•yesturi•11h ago•96 comments

Waypoint-1: Real-Time Interactive Video Diffusion from Overworld

https://huggingface.co/blog/waypoint-1
39•avaer•7h ago•11 comments

Nobody likes lag: How to make low-latency dev sandboxes

https://www.compyle.ai/blog/nobody-likes-lag/
38•mnazzaro•4h ago•11 comments

Proton Spam and the AI Consent Problem

https://dbushell.com/2026/01/22/proton-spam/
443•dbushell•15h ago•297 comments

Show HN: Whosthere: A LAN discovery tool with a modern TUI, written in Go

https://github.com/ramonvermeulen/whosthere
177•rvermeulen98•10h ago•63 comments

Neko: History of a Software Pet (2022)

https://eliotakira.com/neko/
20•mifydev•1h ago•7 comments

Floating-Point Printing and Parsing Can Be Simple and Fast

https://research.swtch.com/fp
66•chmaynard•3d ago•1 comments

Show HN: Zsweep – Play Minesweeper using only Vim motions

https://zsweep.com
52•oug-t•5d ago•25 comments

Show HN: New 3D Mapping website - Create heli orbits and "playable" map tours.

https://www.easy3dmaps.com/gallery
25•dobodob•4h ago•12 comments

The tech monoculture is finally breaking

http://www.jasonwillems.com/technology/2025/12/17/Tech-Is-Fun-Again/
73•at1as•6h ago•94 comments

Radicle: The Sovereign Forge

https://radicle.xyz
237•ibobev•8h ago•117 comments

Anthropic Economic Index report: economic primitives

https://www.anthropic.com/research/anthropic-economic-index-january-2026-report
92•malshe•1d ago•53 comments

Zotero 8

https://www.zotero.org/blog/zotero-8/
133•bouchard•3h ago•24 comments

European Alternatives

https://european-alternatives.eu
505•s_dev•9h ago•262 comments

Updates to our web search products and Programmable Search Engine capabilities

https://programmablesearchengine.googleblog.com/2026/01/updates-to-our-web-search-products.html
198•01jonny01•12h ago•168 comments