Hacker News new | past | comments | ask | show | jobs | submit login
How Postgres Makes Transactions Atomic (2017) (brandur.org)
278 points by dmitryminkovsky on Sept 17, 2019 | hide | past | favorite | 26 comments



Submitter, or a moderator, please edit the title to re-add the word "How". That's done automatically, but sometimes it's wrong. It's especially so here.

Also, this remains as fantastic an article on PostgreSQL's MVCC nature as it was previously: https://news.ycombinator.com/item?id=15027870


Also, add "(2017)".


Thanks, done


Thanks. Missed that.


I've noticed that too. In what cases is that useful? It seems unnecessary and actively harmful at times, like in this case.


It's a very common style of headlines recently, and a lot of the time you can remove the "How" without changing the meaning. For example, if I look down The Verge's recent posts, the first one starting with "How" is "How sampling and streaming are changing the future of music" [1]. Titling that "Sampling and streaming are changing the future of music" works fine.

I don't know that it's particularly useful most of the time, it's usually just unnecessary. An example where it actually should have been removed that I remember was this article on The Guardian a while back: "Suburb in the sky: how Jakartans built an entire village on top of a mall" [2]. There's nothing in the article at all about how they built it. It's just a trendy headline style for some reason, and gets used even in cases where it doesn't apply, like that one.

[1]: https://www.theverge.com/2019/9/17/20870347/sampling-streami...

[2]: https://www.theguardian.com/cities/2019/aug/05/suburb-in-the...


Perhaps this cheapening of the word 'how' explains the prevalence of the academic literary tic 'the manner in which' in its place.


> In what cases is that useful?

Edit: whoops, I thought you were replying to the request to add 2017 to the title.

If you've possibly already read it and are wondering if it's a repeat, if you have knowledge that the topic has had changes since then which might make it less accurate, and any number of other things.

In the end, it's more information, if people want to assume something negative about it, I feel that's on them (as long as the information shown is accurate).


I feel you’re talking about the date in brackets, which most people agree is useful. However the GP is discussing a different behaviour on HN where the word “How” is automatically dropped from headlines when it is used as a prefix. This behaviour doesn’t provide more information, as you state, though your opinion of its desirability might still differ from the GPs.


Yeah, I noticed that myself a bit ago, and edited my comment. You're correct in that I was talking about the date. Thread comprehension fail on my part. :)


From the previous discussion, I discovered that the author used Monodraw to create the diagrams. I'm excited to check it out - https://monodraw.helftone.com/


Mac only?


If you want cross platform ascii diagram editor, then look at jave. It’s old but still works.

http://www.jave.de/


Yup


The "How" at the beginning of the title is important: this is clickbait without it.


When you submit a title that begins with "How", HN automatically removes the "How" -- ironically, as an attempt to avoid clickbait.


How is it clickbait rather than just a less than precise a description of the material?


As a headline, "Postgres Makes Transactions Atomic" would be read by many as being a new feature. Adding "How" removes that reading.


It's a minor typo, but in the first paragraph under the heading Defensive programming this sentence occurs:

> I won’t go into subcommits in any detail, but it’s worth nothing that because TransactionIdCommitTree cannot be guaranteed to be atomic

From the context I think the word "nothing" should be "noting", as in, "It's worth noting".



It might be a newbie question, but for my own culture, what is the impact of a given snapshot if the database is really big ?

I guess it all depends on what data we are touching, but let imagine I want to update all the rows for a table with 1 billions entries, wouldn't the snapshot be giantic ?

Or maybe I misunderstood what is a snapshot.


A snapshot is actually just a struct with a few transaction IDs (xids) and some other bookkeeping that describes which slice of the physically stored data is supposed to be visible to a transaction. The article shows the details of that. So the size of a snapshot is unrelated to the size of the database.


Thanks for the information. I read the article but didn't understand it well.


Interesting coincidence that early yesterday I found this blog when searching for transaction patterns. I skimmed the transactions for idempotent apis (2017) and its part ii. Hadn’t heard of it before but liked the diagrams


Interested in how the author created the images; they have a beautiful, clear retro look.


AFAIK Brandur uses Monodraw [1]. It's so cool, I even purchased a license for myself, although the author of the app stopped its active development [2].

[1] https://monodraw.helftone.com/

[2] https://blog.helftone.com/monodraw-maintenance-mode/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: