HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Identifying postgres db health tool similiar to mysqlcheck

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresmysqlcheckhealthidentifyingsimiliartool

Problem

I'd like to run a check against databases in postgresql to verify that everything is ok after the server crash. On mysql it would be mysqlcheck. I would like to know the postgres equivalent.

Solution

As of 9.2, there is no such tool, and probably wont be for some time. There have been efforts to put checksum per page but that has not happened yet due to what has been referred to as a set of "deadly traps." Until that happens, I doubt that such tools will even be feasible beyond some very basic cases. So the answer, I am afraid is that the infrastructure required to do this efficiently is not part of the system yet.

Assuming working hardware, drives that don't lie about write completion, sane settings, etc. it should be impossible for something like an unclean shutdown to cause corrution in PostgreSQL but I have seen it a few times (overheating machines, and the like). So I do agree with you about the need. It's just worth noting that it is not that easy to do.

Context

StackExchange Database Administrators Q#33633, answer score: 3

Revisions (0)

No revisions yet.