Search Postgresql Archives

Re: verifying database integrity - fsck for pg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31.01.2006, at 16:00 Uhr, Rich Doughty wrote:

i had considered pg_dump. i was hoping there was a utility similar
to fsck that could check for corruption. i'd like to verify now that
the data is ok, rather than coming across errors in 6 months time.

I have done this using JDBC (and the WebObjects frameworks) a few months ago. It wasn't a big problem as I could crawl over the defined tables (entities) in my database definition file (EOModel) and then compare row by row. It was slow like hell as it had to go over every row and over nearly every column, but it wasn't really complicate to write.

Unfortunately I don't have the code for that anymore as I have deleted the project by accident (I have made this with one of my test projects).

But as far as I see, you can do the same with every tool that may connect to two datasources, can iterate over a result set (rows and columns) and can compare contents.

Perhaps you have to do some tricks to tell the script which tables or columns should be equal and which are allowed to differ, but as far as I can see, it shouldn't be that hard. At all, it took me about a day to verify the db contents.

cug

--
PharmaLine Essen, GERMANY and
Big Nerd Ranch Europe - PostgreSQL Training, Feb. 2006, Rome, Italy
http://www.bignerdranch.com/classes/postgresql.shtml


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux