Yesterday, something weird happend on my M2 MBP 14 (16/10/1TB). I was running some CPU intensive multithreaded Python code on two terminal sessions when I experienced some serious slowing down and eventually a popup came on the screen saying I was running low on memory with the option to force quit one of a set of running application. Before I could respond by killing one of the Python programs, the system froze, hung completely and after about 5 minutes rebooted. No problem I thought, since I keep almost all stuff on some form of cloud storage (iCloud, GitHub, S3). When the system came back I discovered that Postgresql 15 was not running. After a lot of digging around I found that the following happened:
Nothing was permanently lost and I got everything up and going after about two hours except for the database which I am now in the process of rebuilding from the original source data. But I will definitely go back to 64GB when I buy my next MBP (M4 probably) and will also make sure to reboot more frequently.
- The /usr/local/var folder was gone. This is the directory that contains the local Postgresql database I am running.
- Homebrew lost its permissions on the /opt folder.
- All of the terminal history of live sessions did not get written in the zsh history (this I rely extensively on).
Nothing was permanently lost and I got everything up and going after about two hours except for the database which I am now in the process of rebuilding from the original source data. But I will definitely go back to 64GB when I buy my next MBP (M4 probably) and will also make sure to reboot more frequently.