Ubuntu 22.04 - PostgreSQL scenarios to Start with 'could not access file' scenarios After Upgrade
I'm trying to debug I'm integrating two systems and I'm working on a personal project and I'm working on a project and hit a roadblock. After upgrading my Ubuntu server from 20.04 to 22.04, my PostgreSQL 14 service fails to start. The behavior message in the logs reads: `2023-10-15 14:23:45.123 UTC [12345] FATAL: could not access file "base/12345/1234": No such file or directory`. I checked the data directory permissions and they seem correct, as the owner is the `postgres` user and the group is `postgres` as well. I also verified that the `postgresql.conf` file points to the correct data directory, which is `/var/lib/postgresql/14/main/`. To troubleshoot, I ran `ls -l /var/lib/postgresql/14/main/base/12345/` and received a `No such file or directory` behavior for the specific file `1234`. I suspect that during the upgrade process, some files may have been lost or corrupted. I have tried restoring from a backup, but it seems to be an outdated version and not suitable for my current application state. Is there a way to recover the missing file or verify the integrity of the entire PostgreSQL installation? Any insights on how to address this scenario would be greatly appreciated, as I need the database to be up and running for my application to function properly. This is part of a larger service I'm building. How would you solve this? Has anyone else encountered this? For context: I'm using Sql on Ubuntu 20.04. This is my first time working with Sql latest. Could this be a known issue?