Re: Database corrupted

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Yann ROBIN <me(dot)show(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Database corrupted
Date: 2011-12-05 21:32:32
Message-ID: CAOR=d=2wAWxLmSR3niD6qzk9Pq1D_G28VhemjBsYrfNCsgjN-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Dec 5, 2011 at 1:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
>> On Mon, Dec 5, 2011 at 1:18 PM, Yann ROBIN <me(dot)show(at)gmail(dot)com> wrote:
>>> kill -9 of the writer process
>
>> Are you sure you killed all the postgres backends before restarting
>> the server?  If other backends are still running, with a dead
>> postmaster, and you restart the server, instant corruption.
>
> There are interlocks against that ... although if you were foolish
> enough to manually remove postmaster.pid, you could defeat them :-(

I've had to remove it once or twice in the past (has that behavior
changed in more recent versions, where it's smarter about it?) but I
knew to check for orphaned backends as well. If someone did and
didn't respectively then they'd definitely be seeing odd behaviour and
a corrupted database.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jerry Sievers 2011-12-06 02:41:31 Re: Recover from failover
Previous Message Kevin Grittner 2011-12-05 21:24:25 Re: Recover from failover