-
Notifications
You must be signed in to change notification settings - Fork 20
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
duplicate key value violates unique constraint "powa_statements_pkey" #47
Comments
Hi, I already saw similar report but was never able to reproduce it locally or find the root problem unfortunately. What does this query return?
|
@rjuju thank you for the quick reply!
|
And a list of columns, if it helps:
|
Ah yes sorry that column isn't return, so just
|
...sooo, case sensitivity maybe? |
oh wow ok, that explains everything. Apparently this queryid is unpopular enough so it's been discarded, but then reexecuted again and collected again by pg_stat_statements, but with a different case as the client issued an equivalent but not identical statement. That's indeed possible, although not very likely. You could run this on your powa database to fix the situation:
ie. remove one of the versions. The rest should work without problem (unless the same problem exist for another query). I'll fix the extension to make sure that only one version is retained in that case. Dropping one is not a problem as the queries should be equivalent (unless you're really unlucky and have a real hash collision happening when the entry is discarded). |
Thank you! It worked, there were no more instances of that problem. And if it happens again, I know how to solve it until the next release. 16 rows deleted, BTW. |
Great news! Yes this problem is quite unlikely to happen (which is why I couldn't have it fixed until now) so hopefully you won't face it again. Also, I just pushed a fix for that, so you could hot-patch the powa_statements_snapshot() function on the powa repository if needed: f636868#diff-a18be2bbc79c829a7f673d5cfe0044c4e5dd248661e575edc20ecedca0499cd6R2539-R2548 instead. I will publish a new release soon, thanks a lot for the report and the help to diagnose the problem! |
had the same issue and in my case, same queryID but slightly different queries: PS: fixed you mentioned works like a charm, merci @rjuju |
@banlex73 thanks a lot for the confirmation! I will take care of the release this weekend. |
de rien
сб, 12 лют. 2022 р. о 00:17 Julien Rouhaud ***@***.***> пише:
… @banlex73 <https://github.com/banlex73> thanks a lot for the confirmation!
I will take care of the release this weekend.
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIHWEYDOWVJQFHVEHCFO5SLU2YJQPANCNFSM5LV33UYA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I just released version 4.1.3! |
I've tried adding this server twice, and there's always this error. Remote setup, pg14 on Powa server and the monitored server, latest Powa from pgdg.
The Powa server is already monitoring 4 other servers so I think it's set up correctly.
Error in GUI:
Error when I try to execute this function from CLI:
The statements snapshot doesn't have any entries for this server:
The text was updated successfully, but these errors were encountered: