HN user

avinassh

6,477 karma

I am learning to build Databases.

CaskDB - https://github.com/avinassh/py-caskdb

Blog at https://avi.im/blag

Posts343
Comments1,030
View on HN
00f.net 2mo ago

Bun's problem may be developing in the open

avinassh
1pts0
avi.im 3mo ago

SQLite prefixes its temp files with `etilqs_`

avinassh
3pts0
penberg.org 6mo ago

Towards a Disaggregated Agent Filesystem on Object Storage

avinassh
1pts0
www.fermyon.com 7mo ago

Fermyon Joins Akamai

avinassh
14pts0
avi.im 10mo ago

Setsum – order agnostic, additive, subtractive checksum

avinassh
4pts1
codeberg.org 10mo ago

Gotosocial: We will not accept changes created with the aid of "AI"

avinassh
4pts1
www.openmymind.net 10mo ago

Everything Is a []U8

avinassh
2pts0
avi.im 10mo ago

Oldest recorded transaction

avinassh
182pts106
edwardtufte.github.io 10mo ago

Tufte CSS

avinassh
207pts48
avi.im 10mo ago

Replacing a cache service with a database

avinassh
81pts66
jack-vanlightly.com 11mo ago

A Conceptual Model for Storage Unification

avinassh
27pts3
law-theorem.com 11mo ago

L2AW Theorem

avinassh
2pts0
database.news 11mo ago

Database.news – curated list of database news from authoritative sources

avinassh
4pts0
avi.im 12mo ago

PSA: SQLite WAL checksums fail silently and may lose data

avinassh
279pts129
antithesis.com 1y ago

A distributed systems reliability glossary

avinassh
1pts0
apenwarr.ca 1y ago

Billionaire Math

avinassh
26pts8
twitter.com 1y ago

D Richard Hipp: The first code check-in for SQLite happened 25 years ago today

avinassh
13pts0
gist.github.com 1y ago

A little bit of slope makes up for a lot of Y-intercept (2012)

avinassh
1pts0
cedardb.com 1y ago

The CedarDB Community Edition

avinassh
12pts1
yeet.cx 1y ago

Lock-Free Rust: How to Build a Rollercoaster While It's on Fire

avinassh
3pts0
shapes.inc 1y ago

Next Chapter of Shapes

avinassh
1pts0
valkey.io 1y ago

A New Hash Table

avinassh
3pts2
rmarcus.info 1y ago

2024's hottest topics in databases (a bibliometric approach)

avinassh
2pts0
en.wikipedia.org 1y ago

Scunthorpe Problem

avinassh
3pts0
qntm.org 1y ago

It's probably time to stop recommending Clean Code

avinassh
7pts0
news.ycombinator.com 1y ago

Ask HN: What was the best research paper you read in 2024?

avinassh
3pts0
sqlite.org 1y ago

SQLite4 – SQLite on LSM Tree (2014)

avinassh
2pts0
www.cs.cmu.edu 1y ago

Databases in 2024: A Year in Review

avinassh
625pts209
avi.im 1y ago

Fun facts about SQLite

avinassh
393pts191
medium.com 1y ago

PostgreSQL Meets ScyllaDB's Lightning Speed and Monstrous Scalability

avinassh
7pts1

You can shard your SQLite tables into multiple database files and query across all of them from a single connection.

You mean using ATTACH statement, right? If you use WAL mode, then you cannot get transaction safety / ACID with ATTACH [0]

If the main database is ":memory:" or if the journal_mode is WAL, then transactions continue to be atomic within each individual database file. But if the host computer crashes in the middle of a COMMIT where two or more database files are updated, some of those files might get the changes where others might not.

Moreover, ATTACH do not support more than 125 databases, so that limits the shards to 125. [1]

ATTACH does not solve the concurrency problems. That's why SQLite also has a BEGIN CONCURRENT experimental branch

[0] https://www.sqlite.org/lang_attach.html

[1] https://www.sqlite.org/limits.html

Is it possible to create a filter that can work over a complex join operation?

That's what IVM systems like Noria can do. With application + cache, the application stores the final result in the cache. So, with these new IVM systems, you get that precomputed data directly from the database.

Views in Postgres are not materialized right? so every small delta would require refresh of entire view.

I wrote the first article, and I thought documentation is clear, but then I saw comment by Hipp which got confused me:

If you switch to WAL mode, the default behavior is that transactions are durable across application crashes (or SIGKILL or similar) but are not necessarily durable across OS crashes or power failures. Transactions are atomic across OS crashes and power failures. But if you commit a transaction in WAL mode and take a power loss shortly thereafter, the transaction might be rolled back after power is restored.

https://news.ycombinator.com/item?id=45014296

the documentation is in contradiction with this.

Monodraw 11 months ago

am now always looking for more ways to include this for inline-documentation.

same lol. here is a blog post of mine where I used them - https://avi.im/blag/2024/disaggregated-storage

I had to convert them to images because I couldn't get to working with Hugo, static site generator

hey, I just tested and `NORMAL` is default:

    $ sqlite3 test.db
    
    SQLite version 3.43.2 2023-10-10 13:08:14
    Enter ".help" for usage hints.
    sqlite> PRAGMA journal_mode=wal;
    wal
    sqlite> PRAGMA synchronous;
    1
    sqlite>

edit: fresh installation from homebrew shows default as FULL:
    /opt/homebrew/opt/sqlite/bin/sqlite3 test.db
    SQLite version 3.50.4 2025-07-30 19:33:53
    Enter ".help" for usage hints.
    sqlite> PRAGMA journal_mode=wal;
    wal
    sqlite> PRAGMA synchronous;
    2
    sqlite>
I will update the post, thanks!
Obsidian Bases 11 months ago

is there any easier way to manage bookmarks with Obsidian? With Bases, I would get a nice UI as well

Good system design 11 months ago

OP has this first:

If a system has distributed-consensus mechanisms, many different forms of event-driven communication, CQRS, and other clever tricks, I wonder if there’s some fundamental bad decision that’s being compensated for (or if the system is just straightforwardly over-designed).

then later down in the article:

Send as many read queries as you can to database replicas. A typical database setup will have one write node and a bunch of read-replicas. The more you can avoid reading from the write node, the better - that write node is already busy enough doing all the writes.

isn't this same as CQRS

I don't know if you have some personal vendetta against me, because you are citing things I did not say. I did not say SQLite is unreliable. I said SQLite stops at checksum errors found in WAL and stops recovery, which may lead to data loss. Which part of this is incorrect?

On SQLite contribution, I did not say it's "impossible." I said it's not open to contribution. This is the exact phrase from the linked page.

Yes, this is a good example of showing an we cannot partly apply the WAL always. Again, let me repeat it, we cannot partly apply the WAL all the time expect it to work but there are some valid cases where we can do that to recover. Your example is not the one.

of all places, I did not expect to get personal attacks on HN :)

yet makes fundamental mistakes in understanding what the WAL does and how it's possible not to "partly" apply a WAL.

Please provide citation on where I said that. You can't partly apply WAL always, but there are very valid cases where you can do that to recover. Recovery doesn't have to automatic. It can be done by SQLite, or some recovery tool or with manual intervention.

- Said person maligns SQLite as being impossible to contribute; whereas the actual project only mentions that they may rewrite the proposed patch to avoid copyright implications.

Please provide citation on where I said that. Someone asked me to send a patch to SQLite, I linked them to the SQLite's page.

As a SQL-first developer, I don't pick apart write-ahead logs trying to save a few bytes from the great hard drive in the sky, I just want the database to give me the current state of my data and never be in an invalid state.

Yes, that is a very valid choice. Hence, I want databases to give me an option, so that you can choose to ignore the checksum errors and I can choose to stop the app and try to recover.