macOS Sonoma 14.2.1 (23C71), just updated to 14.5 (23F79)
Story
I had a python script (norgis ALKIS-Import) importing a lot of Data into my Postgres Database over the weekend. When I came back today the database was still running but I couldn't access it. I got this error message:"base/5/2703": No such file or directory
. After restarting my Mac it wouldn't launch anymore.
Backups
I have a Directly Attached Storage with RAID 10 where I do daily and monthly backups using a rsync shell script and LaunchAgents. It just copies the var-16 folder over to the big storage. I tried launching every single daily backup (7) and the monthly backup and they all have the same error. I also had a backup which was a few weeks old but I get the same error. My Mind just can't explain why the heck all of my backups are just damaged without me touching any of them.
What I've tried
- I created a new Postgres Server on the same Mac and it runs perfectly fine.
- I ran the Server on another Mac (it's stored on an external ssd) but still got the same error message.
This is the log output from the postgresql.log file after launching the server.
2024-07-22 14:29:58.728 CEST [9382] LOG: listening on IPv6 address "::", port 5432
2024-07-22 14:29:58.728 CEST [9382] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-07-22 14:29:58.729 CEST [9382] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-07-22 14:29:58.744 CEST [9382] LOG: could not open directory "pg_tblspc/.DS_Store/PG_16_202307071/pgsql_tmp": Not a directory
2024-07-22 14:29:58.744 CEST [9382] LOG: could not open directory "pg_tblspc/.DS_Store/PG_16_202307071": Not a directory
2024-07-22 14:29:58.745 CEST [9385] LOG: database system was interrupted while in recovery at 2024-07-22 14:23:35 CEST
2024-07-22 14:29:58.745 CEST [9385] HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
2024-07-22 14:30:03.952 CEST [9385] LOG: database system was not properly shut down; automatic recovery in progress
2024-07-22 14:30:03.966 CEST [9385] FATAL: could not open directory "pg_tblspc/.DS_Store/PG_16_202307071": Not a directory
2024-07-22 14:30:03.967 CEST [9382] LOG: startup process (PID 9385) exited with exit code 1
2024-07-22 14:30:03.967 CEST [9382] LOG: aborting startup due to startup process failure
2024-07-22 14:30:03.967 CEST [9382] LOG: database system is shut down
I also don't understand why it wants do something in a .DS_Store directory. Aren't these made and used by macOS?
Edit
If anyone knows why all of my backups got damaged as well please answer that. Where did the .DS_Stores come from and why did postgres try to do something with the .DS_Store files? Thank you!