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

Additional metric number of database locks #26317

Closed
samiura opened this issue Aug 30, 2023 · 3 comments
Closed

Additional metric number of database locks #26317

samiura opened this issue Aug 30, 2023 · 3 comments
Labels
needs triage New item requiring triage receiver/postgresql

Comments

@samiura
Copy link
Contributor

samiura commented Aug 30, 2023

Component(s)

receiver/postgresql

Describe the issue you're reporting

Component(s)

receiver/postgresql

Is your feature request related to a problem? Please describe.

PostgreSQL locks often called “write locks” or “exclusive locks,” restrict users from modifying a row or a PostgreSQL table's contents. Rows that have undergone a DELETE or UPDATE operation will be locked solely until the transaction is finished. Hence, this metric will be useful for users to assess the number of locks.

Describe the solution you'd like.

We can query pg_locks, pg_class to count the number of process PIDs

@samiura samiura added the needs triage New item requiring triage label Aug 30, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

djaglowski pushed a commit that referenced this issue Sep 5, 2023
…26318)

**Description:** Added new metric -- postgresql.database_locks -- the
number of database locks .

**Link to tracking Issue:** #26317

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

---------

Co-authored-by: Antoine Toulme <antoine@toulme.name>
@crobert-1
Copy link
Member

@samiura Did PR #26318 resolve this issue? If so we can close it.

@crobert-1
Copy link
Member

I checked with @samiura and confirmed this issue has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage receiver/postgresql
Projects
None yet
Development

No branches or pull requests

2 participants