Re: View pg_stat_activity slow to get up to date

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Re: View pg_stat_activity slow to get up to date
Дата
Msg-id 20041108152916.624b1866.darcy@druid.net
обсуждение исходный текст
Ответ на Re: View pg_stat_activity slow to get up to date  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: View pg_stat_activity slow to get up to date  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 08 Nov 2004 13:07:34 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "D'Arcy J.M. Cain" <darcy@druid.net> writes:
> > I checked the FAQ and docs but haven't found anything definitive. 
> > This is my SQL test script:
> 
> > SELECT pg_backend_pid();
> > SELECT * FROM pg_stat_activity order by procpid;
> 
> > When I run psql reading that I find that my backend procpid is not
> > in the list.  I know that I can see it if I can introduce a little
> > sleep (1 second) between the connection and the reading of
> > pg_stat_activity.
> 
> ISTM that what you have here is a bad substitute for using user locks
> (see contrib/userlock/).

Perhaps.  I assume that the lock is automatically released when the
holder closes its connection to the database, right?  If so then that's
what I need.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: ExclusiveLock
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Increasing the length of pg_stat_activity.current_query...