Re: Who is locking me?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Who is locking me?
Дата
Msg-id 16029.1268941035@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Who is locking me?  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-general
Bill Moran <wmoran@potentialtech.com> writes:
> In response to "Abraham, Danny" <danny_abraham@bmc.com>:
>> - Can I retrieve the Client PID somewhere (then by process name I will dive into the code).

> If you're on a POSIX system, you can use netstat to find out the details of
> the socket the backend is connected to.

Looking at all the columns of pg_stat_activity, rather than just some of
them, should provide the client address and port number.  I guess you'd
still need netstat or lsof or some other tool to find out what process
owns that port though.

It's quite peculiar that the given query hangs though.  Right offhand,
the only thing I can think of that might block it is an exclusive lock
on pg_proc, or one of the other system catalogs that the parser has to
consult to process the query.  It's *extremely* bad form for a client
to take such a lock at all, much less sit on it while doing nothing.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Justin Graf
Дата:
Сообщение:
Следующее
От: Ovnicraft
Дата:
Сообщение: Re: accounting package