Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want tools for better lock visibility #1

Open
davepacheco opened this issue Sep 14, 2017 · 0 comments
Open

want tools for better lock visibility #1

davepacheco opened this issue Sep 14, 2017 · 0 comments

Comments

@davepacheco
Copy link
Contributor

The DTrace probes for lock-wait-start and lock-wait-done provide tags that can be used to identify the type of locked object (a table, a relation, a transaction) and the mode of lock wanted (various types of shared or exclusive locks). There's some detail in the documentation for locking overall and the pg_locks view. The probes also include tags that can contain the database, relation, or transaction id, depending on what's being locked.

We've found workloads where queries spend most of their time waiting on locks. There are lot of ways we might like to slice the data we can get:

  • per-transaction basis: lock wait events and total time blocked on locks (could be added to pgtxslower)
  • per-lock basis: lock wait events and total time blocked on each different lock
  • overall distribution of lock wait time

It would be very valuable just to be able to print out the lock wait events in a human-readable form (i.e., mapping the locked object and the lock mode to string values).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant