
How Postgres Makes Transactions Atomic (2017) - dmitryminkovsky
https://brandur.org/postgres-atomicity
======
rosser
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](https://news.ycombinator.com/item?id=15027870)

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

~~~
Deimorz
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...](https://www.theverge.com/2019/9/17/20870347/sampling-streaming-
despacito-charli-xcx-music-dani-deahl-future-of-music-vergecast)

[2]: [https://www.theguardian.com/cities/2019/aug/05/suburb-in-
the...](https://www.theguardian.com/cities/2019/aug/05/suburb-in-the-sky-how-
jakartans-built-an-entire-village-on-top-of-a-mall)

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

------
teej
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/](https://monodraw.helftone.com/)

~~~
onemoresoop
Mac only?

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

[http://www.jave.de/](http://www.jave.de/)

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

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

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

------
romaniitedomum
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".

~~~
bgentry
Author accepts PRs via GitHub :)
[https://github.com/brandur/sorg/blob/master/content/articles...](https://github.com/brandur/sorg/blob/master/content/articles/postgres-
atomicity.md)

------
yvan
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.

~~~
petereisentraut
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.

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

------
del_operator
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

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

~~~
ololobus
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/](https://monodraw.helftone.com/)

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

