Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.
Дата
Msg-id CA+TgmoYujHaPmz9hqi4Meh2cNzzVErOi3ivyrvdd_dpY88BX6Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Thu, Mar 10, 2016 at 3:44 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I am trying to test this feature, and there I see not actual data. Maybe
> this behave is not related to this patch:
>
> create table foo(a int);
> insert into foo values(10);
>
> session one:
>
> begin; select * from foo for update;
>
> session two:
>
> begin; select * from foo for update;
> session two is waiting
>
> session one:
> select * from pg_stat_activity -- I don't see correct information about
> session two

At this point, I get:

rhaas=# select query, state, wait_event, wait_event_type from pg_stat_activity;                                 query |
state |  wait_event   | wait_event_type
 

-------------------------------------------------------------------------+--------+---------------+-----------------select
query,state, wait_event, wait_event_type from
 
pg_stat_activity; | active |               |select * from foo for update; | active | transactionid | Lock
(2 rows)

...which looks right to me.

> session two:
> rollback; begin; select * from foo where a = 10 for update;
> session two is waiting again

I don't see how you can do this here - the session is blocked.

There could well be a bug here, but I need a little more help to find it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Freeze avoidance of very large table.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: checkpointer continuous flushing - V18