Re: Unkillable Backend Processes

From: Robin Iddon <robin(at)edesix(dot)com>
To: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Unkillable Backend Processes
Date: 2006-05-23 07:04:43
Message-ID: 4472B40B.1080005@edesix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


>
> There's also an NFS mount point.
>
It's a long time since I used NFS but when I last did you had the choice
between hard and soft mounts. A hard mount would behave like a physical
drive (and would more-or-less never give up trying to commit a write)
while a soft mount would return an error to the calling process should
the mount become unavailable.

Next time this happens you should be able to run

ps -eo pid,wchan,user,args -u postgres

Or similar (you need the wchan somehow or other - top can show it to,
but I cannot remember the letter to toggle its display :-)), and
obviously I assume that postgres is the user pg runs under.

Your rogue process should show up a system call in the wchan column,
and if you keep listing the process it won't change. This shows you are
stuck (and also the args should show you at least whether it's INSERT or
SELECT etc.).

Even if your NFS mount doesn't have pg stuff on it, it could cause
problems if you manage to stop a process in the kernel that has locked a
resource that pg ends up needing (but I don't see this as likely because
I would imagine a long queue of other processes backing up in the same way).

Unless you really need the NFS mount I might be inclined to turn it off
for a while and see what happens ...

Cheers,
Robin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Meyer Marco 2006-05-23 07:18:19 Howto get tranaction rate in postgres
Previous Message Meyer Marco 2006-05-23 06:50:45 How to mesure transaction rate in Postgres