Nested Wait Events?

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Nested Wait Events?
Date: 2016-12-12 16:33:01
Message-ID: CANP8+jKsS6SDo011AUWrLdBcBMv0KJha69t7eFGqEtqx9FVfag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Last week I noticed that the Wait Event/Locks system doesn't correctly
describe waits for tuple locks because in some cases that happens in
two stages.

Now I notice that the Wait Event system doesn't handle waiting for
recovery conflicts at all, though it does access ProcArrayLock
multiple times.

In both cases I tried to fix the problem before mentioning it here.

We can't add waits for either of those in a simple way because the
current system doesn't allow us to report multiple levels of wait. In
both these cases there is a single "top level wait" i.e. tuple locking
or recovery conflicts, even if there are other waits that form part of
the total wait.

I'm guessing that there are other situations like this also.

Don't have a concrete proposal, but I think we need a more complex
model for how we record wait event data. Something that separates
intention (e.g. "Travelling to St.Ives") from current event (e.g.
"Waiting for LWLock")

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-12-12 16:33:47 Re: exposing wait events for non-backends (was: Tracking wait event for latches)
Previous Message Tom Lane 2016-12-12 16:32:27 Re: exposing wait events for non-backends (was: Tracking wait event for latches)