On 5/20/24 5:34 AM, Bertrand Drouvot wrote:
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.

Thanks. As such I made it:

"which provides descriptions about wait events and can be combined with `pg_stat_activity` to give more insight into why an active session is waiting."

Jonathan

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to