Обсуждение: How to determine

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

How to determine

От
"Gregery L. Thompson"
Дата:

Had an error message on saying a datafile was missing:

 

1.       How do you determine if you have a healthy postgres database?

 

2.       If you have datafile corruption will the database come up.

 

3.       It seems we have a datafile missing, how can you tell if you have datafile corruption.

 

4.       What do you need to confirm before rebooting?

 

Thanks

 

Greg

 

 

Greg Thompson

Sr. Database Administrator

Redflex Traffic Systems, Inc.

4402 W. Calle Lejos

Glendale, AZ 85310 USA

Ph: +1 (623) 207-2227

Cell: +1 (623) 221-3728

Fx: +1 (623) 207-2050

www.redflex.com

 

Making A Safer World!

 

 

 

 

Gregery Thompson | Senior Database Administrator | Redflex Traffic Systems, Inc.
T +1 623 207 2227 | M +1 623 221 3728 | E gthompson@redflex.com
5651 West Talavi Blvd, Suite 200, Glendale AZ 85306-1884, United States

Confidentiality Note:  This e-mail, and any attachment to it, is intended only for the use of the individual(s) or entity named on the e-mail, and may contain confidential or proprietary information (including copyrighted materials).  If the reader of is not an authorized recipient, you are hereby notified that reading it or further distributing it (other than to the author or the intended recipient) is prohibited and is potentially an infringement of the rights of the sender or intended recipient.  If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. Thank you.

 

 


Confidentiality Note: This e-mail, and any attachment to it, is intended only for the use of the individual(s) or entity named on the e-mail, and may contain confidential or proprietary information (including copyrighted materials). If the reader of is not an authorized recipient, you are hereby notified that reading it or further distributing it (other than to the author or the intended recipient) is prohibited and is potentially an infringement of the rights of the sender or intended recipient. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. Thank you.   ­­  

Вложения

Re: How to determine

От
Albe Laurenz
Дата:
Gregery L. Thompson wrote:
> Had an error message on saying a datafile was missing:
> 
> 1.       How do you determine if you have a healthy postgres database?

pg_dumpall the cluster and see if you get errors.
That won't find all data corruption (e.g. a broken index),
but it is a good starting point.
Besides, if it succeeds, you have a backup in case the data corruption
eats your data.

> 2.       If you have datafile corruption will the database come up.

Yes, in most cases.

> 3.       It seems we have a datafile missing, how can you tell if you have datafile corruption.

See 1)
If you know the name of the missing datafile, you can query for
the "relfilenode" column of the "pg_class" table to find out which table
it belongs to.

> 4.       What do you need to confirm before rebooting?

I do not understand this question.
If you have data corruption, a reboot will probably not help.

Yours,
Laurenz Albe