Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Alvaro Herrera
Michael Paquier wrote: On Sat, Jul 18, 2015 at 6:59 PM, Amitabh Kant amitabhk...@gmail.com wrote: A development box hard disk failed which was running a PG instance with multiple databases on it. I got the data recovered with some bad sector errors. Ran another instance of PG (same

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Tom Lane
Amitabh Kant amitabhk...@gmail.com writes: A development box hard disk failed which was running a PG instance with multiple databases on it. I got the data recovered with some bad sector errors. Ran another instance of PG (same version), and was to able to take dump (using pg_dump) of all but

[GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Amitabh Kant
Hi A development box hard disk failed which was running a PG instance with multiple databases on it. I got the data recovered with some bad sector errors. Ran another instance of PG (same version), and was to able to take dump (using pg_dump) of all but one database. For one database I am

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Michael Paquier
On Sat, Jul 18, 2015 at 6:59 PM, Amitabh Kant amitabhk...@gmail.com wrote: A development box hard disk failed which was running a PG instance with multiple databases on it. I got the data recovered with some bad sector errors. Ran another instance of PG (same version), and was to able to take

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Alvaro Herrera
Tom Lane wrote: Amitabh Kant amitabhk...@gmail.com writes: As for running the sql command as suggested by Tom, here is the result: template1=# select * from pg_class where pg_relation_filenode(oid) = 11678; pg_class | 11 | 83 | 0 | 10 | 0 | 0 |

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Amitabh Kant
I am just experimenting with the crashed DB. Before I tried anything else, I did make a complete copy of the recovered directory tree. As for running the sql command as suggested by Tom, here is the result: template1=# select * from pg_class where pg_relation_filenode(oid) = 11678; relname |

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Tom Lane
Amitabh Kant amitabhk...@gmail.com writes: As for running the sql command as suggested by Tom, here is the result: template1=# select * from pg_class where pg_relation_filenode(oid) = 11678; pg_class | 11 | 83 | 0 | 10 | 0 | 0 | 0 |8 |

Re: [GENERAL] Recovering database from crashed HD (bad sectors)

2015-07-18 Thread Amitabh Kant
On Sun, Jul 19, 2015 at 4:10 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Amitabh Kant amitabhk...@gmail.com writes: As for running the sql command as suggested by Tom, here is the result: template1=# select * from pg_class where pg_relation_filenode(oid) = 11678;