Hacker News new | ask | show | jobs
by SigmundA 28 days ago
>Unsafe extensions can take down the whole instance in the threaded model, processes contain the blast radius to that connection.

MSSQL has its own task scheduler with the ability to kill etc, its like its own OS internally in that respect but yes there is no memory protection there for unmanaged code.

It doesn't really have unsafe extensions other than it is possible to create extended stored procedures which could do bad things, very frowned upon. If you were concerned about that you would run that database in its own instance (process).

https://learn.microsoft.com/en-us/sql/relational-databases/s...

https://learn.microsoft.com/en-us/sql/t-sql/language-element...

https://learn.microsoft.com/en-us/sql/relational-databases/e...

>I'm thinking the buffer cache and locks and WAL coordination are just as fast - it's just mmap'd SHM into each process.

Plan caches contain pointers to executable code and sometimes jitted code, this cannot be just shared to another process with a different address space and work, this is code not data, to transport between processes it needs to be serialized in a way that is not tied to process memory including things like ASR, certainly doable but since it wasn't designed that way much needs to be changed vs just sharing between threads.

https://en.wikipedia.org/wiki/Position-independent_code