Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an excellent and very clever trick; however what it does is store the sql database in binary format, and use the dump only for the diff.

Would it not be simpler to only store the text dump each time? (The dump can be used trivially to rebuild the db should the need arise, and it's human readable).

So maybe a pre-commit or pre-staging hook would be even better for this use case?



It kinda depends on performance, a large database may take a while to rebuild depending on indices and the like. But then, the same can be said for the output of this dump command (and diffing the result). It's probably manageable for a gnucash database (1000 - 100000 record order of magnitude if I were to guess), but for anything larger the dump command will take ages.


If the database is huge you don't want to store every version as a whole blob in git...

I don't have experience with truly huge dbs in the gigabytes or terabytes, but up to, say, 250 Mb the dump feels very fast.




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

Search: