You are correct that writes are not guaranteed to be atomic.
PostgreSQL has a feature to handle torn pages: full_page_writes = on, which is enabled by default. This means you do double write.
For RocksDB I believe torn pages are not a problem as SST files are immutable. But correct me if I am wrong.
Also, how was it guaranteeing the page writes were atomic?