Re: [GENERAL] recover corrupt DB?

2009-05-05 Thread Alvaro Herrera
Dan Armbrust escribió: > My particular disk-full condition was on ext2. Nothing exotic. Also, > the process that filled the disk was postgres - if that makes any > difference - I had left a debug level turned up in the postgres config > file, and it was logging every single db query. Since it w

Re: [GENERAL] recover corrupt DB?

2009-05-04 Thread Dan Armbrust
> These reports seem to come up a bit, with disk full issues resulting in > the need to pg_resetxlog, dump, and re-initdb, but I wouldn't be too > shocked if they all turned out to be on xfs or something like that. > My particular disk-full condition was on ext2. Nothing exotic. Also, the proces

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Tom Lane
Craig Ringer writes: > These reports seem to come up a bit, with disk full issues resulting in > the need to pg_resetxlog, dump, and re-initdb, but I wouldn't be too > shocked if they all turned out to be on xfs or something like that. Well, there are cases where that might actually be the best s

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
Tom Lane wrote: > Craig Ringer writes: >> I've been wondering about this for a while. Why does Pg end up with the >> database in an unusable, unrecoverable state after a disk-full error? > > It doesn't. There must have been some other filesystem misfeasance > involved in the OP's problem. Cool

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Tom Lane
Craig Ringer writes: > I've been wondering about this for a while. Why does Pg end up with the > database in an unusable, unrecoverable state after a disk-full error? It doesn't. There must have been some other filesystem misfeasance involved in the OP's problem. regard

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
> On all our servers we have a cron job that runs daily and reports disk > usage stats. > Maybe you need something similar. Of course. I have Cacti running to monitor disk usage on all my servers. That doesn't help if a user creates several duplicates of a huge table, or otherwise gobbles disk s

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Steve Clark
Craig Ringer wrote: Peter Eisentraut wrote: On Thursday 23 April 2009 18:30:27 Dan Armbrust wrote: I had a test system (read as not backed up, sigh) which had the disk go full while PostgreSQL was loaded, consequently, PostgreSQL will no longer start. It is logging an error about detecting an

Re: [GENERAL] recover corrupt DB?

2009-05-01 Thread Craig Ringer
Peter Eisentraut wrote: On Thursday 23 April 2009 18:30:27 Dan Armbrust wrote: I had a test system (read as not backed up, sigh) which had the disk go full while PostgreSQL was loaded, consequently, PostgreSQL will no longer start. It is logging an error about detecting an invalid shutdown, try

Re: [GENERAL] recover corrupt DB?

2009-04-23 Thread Milos Babic
Yes. Some things like duplicate primary key can exist in pg_resetxlog-ed db. So, dump db and restore it again on clean initialized cluster. Regards Milos On Thu, Apr 23, 2009 at 8:25 PM, Dan Armbrust < daniel.armbrust.l...@gmail.com> wrote: > > In general, pg_resetxlog would be > > the tool to

Re: [GENERAL] recover corrupt DB?

2009-04-23 Thread Dan Armbrust
>  In general, pg_resetxlog would be > the tool to try here.  Don't panic yet. ;-) > > Yep, that was the command I was looking for. That at least got the DB to a point where it would start, and I was able to do a dump. So, I dumped and reloaded all of the databases. Things seem fine, but bits

Re: [GENERAL] recover corrupt DB?

2009-04-23 Thread Peter Eisentraut
On Thursday 23 April 2009 18:30:27 Dan Armbrust wrote: > I had a test system (read as not backed up, sigh) which had the disk > go full while PostgreSQL was loaded, consequently, PostgreSQL will no > longer start. > > It is logging an error about detecting an invalid shutdown, trying to > replay so

[GENERAL] recover corrupt DB?

2009-04-23 Thread Dan Armbrust
I had a test system (read as not backed up, sigh) which had the disk go full while PostgreSQL was loaded, consequently, PostgreSQL will no longer start. It is logging an error about detecting an invalid shutdown, trying to replay something, and then an error about not being able to open a file it