Hello,
On Tue, May 29, 2018 at 07:32:38AM +0000, PG Bug reporting form wrote:
> [dhirsing@jira-stg ~]$ sudo -u postgres psql postgres
> [sudo] password for dhirsing:
> could not change directory to "/home/dhirsing"
> psql: FATAL: database "postgres" does not exist
> DETAIL: The database subdirectory "base/12950" is missing.
I think you missed postgres database directory. Can you check using a
file manager if the directory "base/12950" exists in your PGDATA?
If it is lost the only way is to restore your instance from a backup.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company