-
Notifications
You must be signed in to change notification settings - Fork 35
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
No per process wait stats #17
Comments
Hi,
It is set - I occasionally get a queryid listed. For example the SELECT
from the wait sampling tables has one associated.
Cheers,
James Sewell
…On Tue, 25 Feb 2020 at 12:55 am, Maksim Milyutin ***@***.***> wrote:
Hi @jamessewell <https://github.com/jamessewell> ! I think the parameter
pg_wait_sampling.profile_queries was not set in your case, this is
default behavior.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=AAJJDI7NWP7APAHI3CRXNKTREPGTNA5CNFSM4K2AQHZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMX3TAY#issuecomment-590330243>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJJDI5PHHT25MAPF6SDIFLREPGTNANCNFSM4K2AQHZQ>
.
|
Hi @jamessewell !
Yes, I saw later so removed my last post
OK, I'll try to reproduce your case and get to the bottom of it . |
Hi @jamessewell ! Sorry for so delayed answer. The core issue here is that the lock acquiring on relations happens on parse-analyze stage when database objects in query is transformed from test representation to internal one. But computing of queryId in |
In general, due to much of locks on relations and other db objects are acquired in parse-analyze routine there is no ability to assign queryId values to the waits on transactional locks, i.e., monitoring by queryId is not applicable to lock waits in most cases. And unfortunately we are not able to amend this situation because queryId is attached to In a certain sense this issue might be solved after segregation of analyze and lock expansion stages in postgres core. |
In general, with current state of lock acquiring mechanics it's possible to assign queryId value to the waiting on heavyweight locks. But this assignment will be deferred. And it would require some investigation to make it correctly. |
Hi,
I have
pg_stat_statements
andpg_wait_sampling
loaded on PostgreSQL 11.5I am forcing a lock like this:
session 1:
session 2:
This shows up as so:
Why is queryid not populated?
The text was updated successfully, but these errors were encountered: