From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PostgreSQL 17 Beta 1 release announcement draft |
Date: | 2024-05-20 09:34:32 |
Message-ID: | ZksZKCVQah1yROX5@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Sun, May 19, 2024 at 05:10:10PM -0400, Jonathan S. Katz wrote:
> On 5/16/24 1:15 AM, Bertrand Drouvot wrote:
> > Hi,
> >
> > On Wed, May 15, 2024 at 09:45:35PM -0400, Jonathan S. Katz wrote:
> > > Hi,
> > >
> > > Attached is a copy of the PostgreSQL 17 Beta 1 release announcement draft.
> >
> > Thanks for working on it!
> >
> > I've one comment:
> >
> > > PostgreSQL 17 also introduces a new view, [`pg_wait_events`](https://www.postgresql.org/docs/17/view-pg-wait-events.html), which provides descriptions about wait events and can be combined with `pg_stat_activity` to give more insight into an operation.
> >
> > Instead of "to give more insight into an operation", what about "to give more
> > insight about what a session is waiting for (should it be active)"?
>
> I put:
>
> "to give more in insight into why a session is blocked."
Thanks!
>
> Does that work?
>
I think using "waiting" is better (as the view is "pg_wait_events" and the
join with pg_stat_activity would be on the "wait_event_type" and "wait_event"
columns).
The reason I mentioned "should it be active" is because wait_event and wait_event_type
could be non empty in pg_stat_activity while the session is not in an active state
anymore (then not waiting).
A right query would be like the one in [1]:
"
SELECT a.pid, a.wait_event, w.description
FROM pg_stat_activity a JOIN
pg_wait_events w ON (a.wait_event_type = w.type AND
a.wait_event = w.name)
WHERE a.wait_event is NOT NULL and a.state = 'active';
"
means filtering on the "active" state too, and that's what the description
proposal I made was trying to highlight.
[1]: https://www.postgresql.org/docs/devel/monitoring-stats.html
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrei Lepikhov | 2024-05-20 09:40:31 | Re: using extended statistics to improve join estimates |
Previous Message | Mark Cave-Ayland | 2024-05-20 09:20:09 | Re: commitfest.postgresql.org is no longer fit for purpose |