

The cloud, and any form of managed database, inverts this. User accounts are extremely easy, as they are automatically provisioned with secrets you can easily rotate, along with the database itself. There is less of a worry about user rights as well, as you can dedicate one “instance” of a database to certain types of data, instead of having more than one database within one instance.
And then, traffic is commonly going to be routed through untrusted networks, hence the desire for encryption in transit.
Databases are special. They ofte implement their own optimizations, faster than more general system optimizations.
For examole: https://www.postgresql.org/docs/current/wal-intro.html
I didn’t see much in the docs about swap, but I wouldn’t be suprised if postgres also had memory optimizations, like it included it’s own form of in memory compression.
Your best bet is probably to ask someone who is familiar with the internals of postgres.