Re: postgres process got stuck in "notify interrupt waiting" status

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres process got stuck in "notify interrupt waiting" status
Date: 2012-09-05 14:38:33
Message-ID: 16184.1346855913@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> writes:
> On 09/05/2012 12:21 PM, John R Pierce wrote:
>> was this a client process or a postgres process? kill -9 on postgres
>> processes can easily trigger data corruption.

> It certainly shouldn't.

> kill -9 of the postmaster, deletion of postmaster.pid, and re-starting
> postgresql *might* but AFAIK even then you'll have to bypass the shared
> memory lockout (unless you're on Windows).

Correction on that: manually deleting postmaster.pid *does* bypass the
shared memory lock. If there are still any live backends from the old
postmaster, you can get corruption as a result of this, because the old
backends and the new ones will be modifying the database independently.

This is why we recommend that you never delete postmaster.pid manually,
and certainly not as part of an automatic startup script.

Having said that, a kill -9 on an individual backend (*not* the
postmaster) should be safe enough, if you don't mind the fact that
it'll kill all your other sessions too.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johan Nel 2012-09-05 15:15:24 Re: alter view, add/drop column
Previous Message Gauthier, Dave 2012-09-05 14:16:17 alter view, add/drop column