| ▲ | sethev 3 hours ago | ||||||||||||||||||||||||||||||||||
Interesting idea - I like seeing a list of pet-peeves followed by a proposal for a straightforward way to have a set of 'alternative defaults' that remains backwards compatible. If you don't want to opt in, don't run the new PRAGMA edition = 2026. Too often it's just a list of issues and a wish that everyone else will change. In (mild) defense of SQLITE_BUSY - busy_timeout just tells sqlite to sleep and retry up to the timeout when it receives SQLITE_BUSY. It seems like a sensible default for a library to leave that up the calling code - which may have something else it could do while it waits. However, that logic often gets missed! | |||||||||||||||||||||||||||||||||||
| ▲ | tptacek 3 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
This isn't so much a list of pet peeves as it is the almost universal way people that work seriously with SQLite configure the database. It's reasonable to suggest that the alternative settings for each of these suggestions is probably the wrong default for 2026. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | aidenn0 27 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
RE: SQLITE_BUSY: I would replace "often" with "nearly always." On top of that, it's often not fixed even when pointed out. "This software only has one writer, so we don't need to handle SQLITE_BUSY" translates to me sending SIGSTOP to a process any time I want to run some queries against its database. | |||||||||||||||||||||||||||||||||||
| ▲ | mamcx 37 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
After read, it hit me that because sqlite is a DB, "editions" as-is not work. Because it not tied to the data but to the code. Instead, what I think should be is that the PRAGMAs become "data" that is always checked in full with "if manually set" and then on next "open" THEY GET APPLIED. That is. (and in the command line when open interactively they show up). | |||||||||||||||||||||||||||||||||||
| ▲ | groundzeros2015 2 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Yep. The whole locking database thing is this persistent myth about SQLite. All databases lock on write, it’s a question of the granularity of the lock. Multiple writers simply take turns. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||