The Data Directory Contains an Old File

PostgreSQL Connection Failure Sometimes, computers have a life of their own. You shut down your laptop and on the next boot, you are unable to connect to a PostgreSQL 12 database. Opening the installed, I notice it displays stale file error. What the heck is the file? Turns out that the is a lock file used to prevent two instances of the same PostgreSQL server from running on the same data-directory.