an issue with django+postgresql

Assalamualaykum.

I am suffering from an issue with django+postgresql which has become so much irritating now these days.

My Django project is a giant project having connected with a large database having 327 tables. My pc is MAC.

The problem is: While connected my project with postgres localhost and if electricity sudden gone, after electricity come back I dont find my database on localost(pg admin for monitoring). It happens only if electricity gone during connection between localhost and my project.

Some times after randomly install postgresql again and again I get back my database on localhost, or sometimes after just one time installation i get back my database. But i think this is not the actual solution.

Would anyone please help me giving the solution? Have anyone yet faced this problem?

Please help me any django expert…

Jazakallahu khairan.

This wouldn’t be a Django issue. Django does not work at the level of creating databases - only tables within the database.

This would appear to be more of a PostgreSQL / system configuration issue.

Rather than just reinstalling PostgreSQL, you need to dig into the logs to see what PostgreSQL is reporting in this situation, along with any system logs that may also apply.