Loading video...

Video Failed to Load

Go Home

Everyone should know how WALs work. Not sure where to start? Write-ahead logs 101:

380,002 views • 2 months ago •via X (Twitter)

40 Comments

Ben Dicken's profile picture
Ben Dicken2 months ago

YouTube, if you're into that kinda thing:

Will King's profile picture
Will King2 months ago

From the queryyyyyy to WAL (to the WAL) til the data's pulled off the log, all your clients can call.

Ben Dicken's profile picture
Ben Dicken2 months ago

Have you considered a career in entertainment Will?

Will King's profile picture
Will King2 months ago

Not quick witted enough! This was my one for the quarter. It took all my juice.

Yash Agarwal's profile picture
Yash Agarwal2 months ago

After going through Ben’s explanation, if you want to dive deeper into how WAL is actually used for database recovery, I wrote a blog covering the recovery process and ARIES from first principles:

Ben Dicken's profile picture
Ben Dicken2 months ago

This is a great article

Yash Agarwal's profile picture
Yash Agarwal2 months ago

@Hi_Mrinal If you get a chance, check out the article. Would love to hear your thoughts and get your feedback!

HSVSphere's profile picture
HSVSphere2 months ago

Great explanation. Also a good WAL is uniform, bcache does this quite nicely in its journal (which can be uniform, as the btrees are also uniform). Check out 9.7 and 9.8 in the principles of operation docs You want everything in your system to use the same infra and no special cases

Jarno's profile picture
Jarno2 months ago

Ask a candidate to explain WAL recovery in an interview and watch the room go quiet.

Ben Dicken's profile picture
Ben Dicken2 months ago

Excellent interview Q

Noah's profile picture
Noah2 months ago

Such a good refresher, you rock at explaining things

Jilles Soeters's profile picture
Jilles Soeters2 months ago

Imagine this on a physical blackboard 😮

纳米AI's profile picture
纳米AI2 months ago

Did you hand-draw this on Excalidraw?

prasad's profile picture
prasad2 months ago

True i built simple wal for 2 months ago for document writes using and also watched your video on that

Saurabh Kumar's profile picture
Saurabh Kumar2 months ago

instead of a cyclical buffer, does a using queue work as well?

Amine's profile picture
Amine2 months ago

Every new architecture blog post seems to be "we added a WAL to S3" so this is very timely, thanks!

Ochuko's profile picture
Ochuko2 months ago

one time my etcd database got corrupted I was trying to do a backup restore that's when I stumbled on WAL, still a rabbit hole tho

Tim Tucker's profile picture
Tim Tucker2 months ago

What software was used to make this diagram?

Ben Dicken's profile picture
Ben Dicken2 months ago

excalidraw

Daniele Scaratti's profile picture
Daniele Scaratti2 months ago

That was really well explained. I'll have to save this for later. it's a helpful recap.

Abdulrahman Sultan's profile picture
Abdulrahman Sultan2 months ago

Great vid as always is the case

Aditya's profile picture
Aditya2 months ago

I’m working on the db branching software . For syncing the main replica with the prod , i had three options : 1) create a pub sub slot and apply changes instantly 2) create a pub slot but apply wal periodically 3) push wal to s3 and apply changes later What should i use ?

Thanos's profile picture
Thanos2 months ago

Bro, it is just a file where you append data to it

LyLy Trann's profile picture
LyLy Trann2 months ago

Chỗ ghi log trước khi ghi dữ liệu chính đúng không, nhìn cái sơ đồ này là dễ hiểu hẳn ra đó 😄

Ramakanth's profile picture
Ramakanth2 months ago

How btree gets stored on the disk

angelo's profile picture
angelo2 months ago

data stored in disk in databases is basically just a materialized view of the event log (WAL in this case)

Magie Chang's profile picture
Magie Chang2 months ago

WAL is one of those things that suddenly makes half of database internals click.

noøne 🐦‍🔥's profile picture
noøne 🐦‍🔥2 months ago

Open a school, I will make sure I pay the school fees 😭😭🤣🤣

Timothy Blumberg's profile picture
Timothy Blumberg2 months ago

Karpathy-tier info density and understandability! Great video thanks!

ucixrn's profile picture
ucixrn2 months ago

Yeah

Kien Trinh's profile picture
Kien Trinh2 months ago

Mình mới tìm hiểu về WAL hôm qua, đọc xong thấy dễ hiểu hơn nhiều luôn 👍

misticos's profile picture
misticos2 months ago

no balls?

Zorro Rebelde's profile picture
Zorro Rebelde2 months ago

6:24 b ga.i, lol

Jay's profile picture
Jay2 months ago

Great watch

Michael Timbs's profile picture
Michael Timbs2 months ago

from an application architecture POV, processing the WAL is also the nicest way to react to state change events in the application.

Gerson Sosa's profile picture
Gerson Sosa2 months ago

It’s useful to see it explained with a drawing. Interestingly the WAL is also used for replication and for backups, is quite an important part on many databases.

TheoryOfNearlyEverything's profile picture
TheoryOfNearlyEverything2 months ago

warum?

Buswe's profile picture
Buswe2 months ago

They also unlock point-in-time recovery: you replay the log up to a chosen timestamp instead of restoring a whole snapshot.

ahmet cemrek's profile picture
ahmet cemrek2 months ago

@readwise save

Heisenberg's profile picture
Heisenberg2 months ago

I have implemented a Toy-WAL in pure Python. You guys can check out. Repo Link:

Related Videos