PostgreSQL is missing after reboot

by sundance_actual   Last Updated September 11, 2019 14:06 PM

I am running Atlassian Jira software and using Postgresql as its database server.

We have a power interruption which turned off the host server and therefore the vm's didn't shut down correctly.

When rebooting the Jira machine, it wouldn't load Jira I forcefully started Jira to realize that it still wasn't connecting to the database.

When switching to user postgres and running psql I get the error

Warning: No existing local cluster is suitable as a default target. Please see man_pg warpper(1) how to specify one.
Error: You must install at least one postgresql-client- package.

There were two versions of postgres on this Ubuntu 18.04 machine 9.5 and 10.

9.5 is installed in /opt/PostgreSql/9.5

10, well I don't have a clue where that is. the only place I can find anything that says 10 is in /etc/postgres/main/10/

the only "data" I can find was in /opt/PostgreSql/9.5/data.

When restarting the PostgresQL service was masked, so I ran

systemctl unmask postgresql.service.

I then ran

sudo service postgresql start

It doesn't look like it started it fully, just some dummy services of it.

I then try to do sudo su postgres then navigate to /opt/PostgreSql/9.5/bin and run ./pg_ctl start but I get an error that says PGDATA isn't defined.

I don't know where to find that or what to do with it.

Is there a daemon or something I need to restart? Why is it saying that there is no version of PostgresQL installed? I am really lost here.



Related Questions



Recovering data from postgresql xlog

Updated July 14, 2015 16:02 PM

postgresql service fails to start after bad reboot

Updated April 26, 2016 08:02 AM