Обсуждение: database server crash und how can i check all tables

Поиск
Список
Период
Сортировка

database server crash und how can i check all tables

От
"AL-Temimi, Muthana"
Дата:

Hello there,

 

i have Postgresql Version 9.1 installed on SuSu Linux Server  and the system of database server is crashed. Because the Harddisk(SAN). Now I restarted it and the system work again. But I want to check all the tables if everything is ok. Is there a command for such problem (check).

 

Because I have the following problem some tables filled with NULL and in normally case that should be not happened.

 

Any help will be gratefull

 

Regards

 

Muthana AL-Temimi

M.Sc. Informations- und Kommunikations-Systeme

 

Technische Universitaet Hamburg Harburg

-Rechenzentrum-

Am Schwarzenberg-Campus 3

D-21073 Hamburg

 

Tel.:  +49.40.42878.2338

Fax.: +49.40.42793.5160

E-Mail: m.al@tu-harburg.de

http://www.tu-harburg.de/rzt

 

 

Re: database server crash und how can i check all tables

От
Дата:

Muthana AL-Temimi wrote on Friday, June 19, 2015 12:33 PM:

 

Ø  But I want to check all the tables if everything is ok. Is there a command for such problem (check).

 

Hello Muthana,

 

I keep hearing that pgdump is good at detecting database corruption, i.e. if pgdump runs into a problem you definitely have corruption.  (Not sure if the converse is also true.)

 

Best regards,

Holger Friedrich

 

Re: database server crash und how can i check all tables

От
Albe Laurenz
Дата:
Holger Friedrich wrote:
> Muthana AL-Temimi wrote on Friday, June 19, 2015 12:33 PM:

>> But I want to check all the tables if everything is ok. Is there a command for such problem
>> (check).

> I keep hearing that pgdump is good at detecting database corruption, i.e. if pgdump runs into a
> problem you definitely have corruption.  (Not sure if the converse is also true.)

Restoring the dump somewhere else gives you even more confidence in the integrity
of your data.

But if you really want to know if everything is ok, you should have used the "-k"
option for initdb to enable block checksums.  Then a pg_dump would definitely tell
you if something is wrong.

Unfortunately checksums can only be enabled at initdb time, not later.

Yours,
Laurenz Albe

Re: database server crash und how can i check all tables

От
Albe Laurenz
Дата:
AL-Temimi, Muthana wrote:
> i have Postgresql Version 9.1 installed on SuSu Linux Server  and the system of database server is
> crashed. Because the Harddisk(SAN). Now I restarted it and the system work again. But I want to check
> all the tables if everything is ok. Is there a command for such problem (check).
> 
> Because I have the following problem some tables filled with NULL and in normally case that should be
> not happened.

That looks a lot like the file system check, while restoring file system integrity,
ate some of your data.  It has happened to me before.

You should restore from a backup.

Yours,
Laurenz Albe