Re: Unkillable Backend Processes - Mailing list pgsql-admin

From Robin Iddon
Subject Re: Unkillable Backend Processes
Date
Msg-id 4472B40B.1080005@edesix.com
Whole thread Raw
In response to Unkillable Backend Processes  ("Thomas F. O'Connell" <tfo@sitening.com>)
List 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


pgsql-admin by date:

Previous
From: Jeff Frost
Date:
Subject: Re: does wal archiving block the current client connection?
Next
From: "Meyer Marco"
Date:
Subject: Howto get tranaction rate in postgres