From: Pavel Stehule <pavel.stehule@gmail.com>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@postgresql.org <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Provide much better wait information in pg_stat_activity.
Date: Thu, 10 Mar 2016 21:44:33 +0100
Message-ID: <CAFj8pRBDO-rbHgWoKVYuJkifa6zcTLFS9wfJ55ECeuqt8uAsaQ@mail.gmail.com> (raw)
In-Reply-To: <E1ae5kR-0007wV-LY@gemulon.postgresql.org>
References: <E1ae5kR-0007wV-LY@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Hi
2016-03-10 19:55 GMT+01:00 Robert Haas <rhaas@postgresql.org>:
> Provide much better wait information in pg_stat_activity.
>
> When a process is waiting for a heavyweight lock, we will now indicate
> the type of heavyweight lock for which it is waiting. Also, you can
> now see when a process is waiting for a lightweight lock - in which
> case we will indicate the individual lock name or the tranche, as
> appropriate - or for a buffer pin.
>
> Amit Kapila, Ildus Kurbangaliev, reviewed by me. Lots of helpful
> discussion and suggestions by many others, including Alexander
> Korotkov, Vladimir Borodin, and many others.
>
> Branch
> ------
> master
>
>
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
session two:
rollback; begin; select * from foo where a = 10 for update;
session two is waiting again
session one:
select * from pg_stat_activity; -- The content is not changed
So content of pg_stat_activity is not correct in holder lock session.
Independent third session see valid content of pg_stat_activity.
Hypothesis: the pg_stat_activity is not refreshed under opened transaction?
Regards
Pavel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pavel.stehule@gmail.com, rhaas@postgresql.org
Subject: Re: pgsql: Provide much better wait information in pg_stat_activity.
In-Reply-To: <CAFj8pRBDO-rbHgWoKVYuJkifa6zcTLFS9wfJ55ECeuqt8uAsaQ@mail.gmail.com>
References: <E1ae5kR-0007wV-LY@gemulon.postgresql.org> <CAFj8pRBDO-rbHgWoKVYuJkifa6zcTLFS9wfJ55ECeuqt8uAsaQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox