On Thu, 2005-10-13 at 11:23, Bruce Momjian wrote:
> Scott Marlowe wrote:
> > On Thu, 2005-10-13 at 10:56, Bruce Momjian wrote:
> > > codeWarrior wrote:
> > > > Lookas as if you've managed to turn off your computer mid-transaction
> > > > thereby corrupting the postgreSQL commit logs (pg_clog)...
> > > >
> > > > You should never just turn off a database server... always shut it down
> > > > normally... Turning it off was a major mistake. I dont know if you can
> > > > recover or not as the system (postgreSQL) now thinks it is in the middle of
> > > > a transaction...
> > >
> > > PostgreSQL should never get corrupted by turning off the server. It
> > > isn't ideal to do that, but it should not get corrupted.
> > Unless it is installed on hardware that lies about fsync.
> > Which almost all ATA drives, parallel and serial, do, sadly.
> Ah, yes, that one. We do have a section in the 8.1 beta docs about that
> which will help in the future:
I still remember when I found out that basically all IDE drives lied
about this. So I built my server with battery backed cache and SCSI
drives, and part of it's acceptance testing was having a heavy
transactional load placed on it and have the power switch flipped off.
We did that about 10 times with different loads, and it never failed to
come right back up.
So, 6 months later, when an electrician dropped a piece of clipped off
copper wire into one of our three power conditioners in the hosting
center, thereby causing an overload that blew out all three power
conditioners AND the UPSes they were connected to, and emergency power
was restored, my machine was the only one in a hosting center of about
100 servers that came up perfectly.
Well, almost perfectly. We had to reboot it because it came up too fast
and none of the nfs servers it normally sees were there yet. The nfs
servers were all bsd boxes, and they all came up too, except for the
ones with >1 fried drives in their RAID 5s, which was only a couple.
It was nice knowing my research and all on PostgreSQL had paid off.
There were plenty of machines with MySQL and with Oracle which did not
survive the power outage.
In response to
pgsql-admin by date
|Next:||From: Scott Marlowe||Date: 2005-10-13 16:31:09|
|Subject: Re: DB Cluster hanging|
|Previous:||From: Bruce Momjian||Date: 2005-10-13 16:23:44|
|Subject: Re: Urgent!|