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 wrote: > Tom Lane wrote: > > Amitabh Kant 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 |

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

2015-07-18 Thread Alvaro Herrera
Tom Lane wrote: > Amitabh Kant 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 |

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

2015-07-18 Thread Tom Lane
Amitabh Kant 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 | 281 |

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 | r

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

2015-07-18 Thread Tom Lane
Amitabh Kant 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 one database. For

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 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 a

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 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 > dump (using pg_du

[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 getting