Postgresql lost tables - postgresql

I have a PostgreSQL database on my centos server.
Unfortunately since yesterday, in all existing schemas, all the tables are lost.
I saw log file and there was an unexpected reboot in recent days, probably a crash of the o.s.
Now the Postgres server it start correctly and I can view triggers, sequences and there aren't other problems.
Can I do something to recovery these tables?
Thanks.

Related

Postgres transaction isolation between databases on same sever

We are experiencing a problem on a Postgres instance where one long running transaction on one database prevent the vacuum process to remove dead tuples on a tables of another database (of the same instance).
It seems crazy to me that xmin is shared cross database.
So here are my questions :
Is that a normal behavior or did we misconfigured something ?
Why is it so ?
Is there a workaround ?
Thanks folks
postgres version 12.4

How to use PoWA at a backup database?

I'm giving a try on PoWA, but I've got a little problem.
My Postgres database is running on AWS RDS.
PoWA needs HypoPG in order to suggest indexes.
But RDS doesn't support HypoPG extension. So I had to install PoWA at my backup database (outside RDS).
The problem is: PoWA isn't analyzing the restored database. It can't recognizes any data. If I execute some SQL queries manually it works though.
Is there something that I can be missing?
And, when I tried Ankane Dexter, I could show it the log files path (dumped at the backup database in parallel). Is there a way to do so in PoWA?
Thanks.

Google Cloud SQL 5.7 - Tables in Database disappearing

Recently we are finding rare issue with Cloud SQL 5.7 that clears the tables in our DB. This happened to couple of DB instances we have. We noticed this incident started on Thursday 2/13/2020, no changes have been made manually to delete the tables but the tables from the database have disappeared.
Any Thoughts?

Stymied by idle_in_transaction_session_timeout

Immediate problem: When I do a pgAdmin 4 restore I get "Stymied by idle_in_transaction_session_timeout" error.
I am on a MacBook Pro running macOS Mojave version 10.14.5, using Java and PostgreSQL. I use the pgAdmin 4 GUI, as I am not proficient in psql, bash, etc. I have a test database named pg2. As you can see from the attachment, PostgreSQL servers 9.4 and 10 have the identical databases. If I make a change in a database on one server, it will show also in the other server’s database. There is a third server, 11, in which there is only the postgres database.
I have tried psql and get errors (including timeout errors).
I have tried to Delete/Drop server 11, it will disappear but when I sign out of pgAdmin 4 and then go into pgAdmin 4 again the server 11 will be there again.
See the attachments for screen shots.
I expect the backup/restore to work: backup, then make a change to the database, then correctly restore to previous state.
I would like to have just one server, preferably 11 with only pg1 and the test db tempdb running in it. I thought that I could live with the three, for I am aware of my current capabilities and thus did not want to screw things up further. However, I suspect that the two servers 9.4 and 10 are the source of my current problem: receiving the idle_in_transaction_session_timeout error while doing a restore. Note: I did the backup using the server 10’s pg1 backup. Did it create 2 backups, one for 9.4 and one for 10?
I tried to attach these before. They will help make sense of my problem.
The 2 servers have the same database; is this causing the idle in transaction session timeout?

PostgreSQL data recovery after migration fail

My team and I are not professional database administrators and we were trying to copy our database from one machine to another for backup purposes. Unluckily we made a mistake of moving the data directory instead of copying it. Something unexpectedly happened during the process and the data was not moved completely. Right now we're missing data for the past one month and both machines are in the same state i.e the original and the copy don't have data for that past month. Is there any possibility of recovering this lost data, and if yes how do we go about it. PostgreSQL version is 9.4 running on centos 7.