ivoras
Joined 13 years ago
Joined 13 years ago
> In particular, I asked ChatGPT to write a function by knowing precisely how I would have implemented it. This is crucial since without knowing the expected result and what every line does, I might end up with a wrong implementation.
In my eyes, it makes the whole idea of AI coding moot. If I need to explain every step in detail - and it does not "understand" what it's doing; I can virtually the statistical trial-and-error behind its action - then what's the point? I might as well write it all myself and be a bit more sure the code ends up how I like it.
link: https://www.linkedin.com/feed/update/urn:li:activity:7289241...
It also often causes (or is caused by) eccentric behavior (or mental issues) - but it's been done since forever, and when it's successful, we call it "visionary." When it's not, we call it "toxic."
While journaling "simply" writes a journal of FS ops to a continuous area of the drive (especially important for mechanical drives) which is fsynced faster than random writes across platters, Soft-updates opts to be really clever with the way FS ops ordered, so that what's actually on the drive is always consistent, even with decent amount of write caching. It doesn't guard file content, though, just the file system itself.
Soft-updates is what enabled the BSD's to support short-lived files never touching the physical drive. You could create a file, write to it, read it, close and delete it, and if this was done in a reasonably short amount of time, no writes whatsoever got to the actual hardware. It was wonderful with software which used to generate a lot of temp files, like building C software.
OTOH, if a write got trough to the hard drive, Soft-updates guaranteed that file system structures get written in a way so that if an OS crash or a power failure happened at any single time, the only downside could be some unreferenced blocks, which could be garbage collected later; assuming hardware doesn't lie about fsync, of course...
I think ext4 supports this kind of short-lived-files-never-touch-the-drive caching.
- Row-level anything introduces write alignment and fsync alignment problems; pages are easier to align than arbitrary-sized rows
- PostgreSQL is very conservative (maybe extremely) conservative about data safety (mostly achieved via fsync-ing at the right times), and that propagates through the IO stack, including SSD firmware, to cause slowdowns
- MVCC is very nice for concurrent access - the Oriole doc doesn't say with what concurrency are the graphs achieved
- The title of the Oriole doc and its intro text center about solving VACUUM, which is of course a good goal, but I don't think they show that the "square wave" graphs they achieve for PostgreSQL are really in majority caused by VACUUM. Other benchmarks, like Percona's (https://www.percona.com/blog/evaluating-checkpointing-in-pos...) don't yield this very distinctive square wave pattern.
I'm sure the authors are aware of these issues, so maybe they will write an overview of how they approached them.