←back to thread

366 points virtualwhys | 1 comments | | HN request time: 0.2s | source
Show context
nightfly ◴[] No.41897421[source]
> MySQL and Oracle store a compact delta between the new and current versions (think of it like a git diff).

Doesn't git famously _not_ store diffs and instead follows the same storage pattern postgres uses here and stores the full new and old objects?

replies(6): >>41897457 #>>41897486 #>>41897759 #>>41897885 #>>41899164 #>>41899189 #
jmholla ◴[] No.41897457[source]
That is correct. Each version of a file is a separate blob. There is some compression done by packing to make cloning faster, but the raw for git works with is these blobs.
replies(2): >>41897535 #>>41898446 #
1. quotemstr ◴[] No.41898446[source]
git's model is a good example of layered architecture. Most of the code works in terms of whole blobs. The blob storage system, as an implementation detail, stores some blobs with diffs. The use of diffs doesn't leak into the rest of the system. Good separation of concerns