-
Notifications
You must be signed in to change notification settings - Fork 4
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
ERROR: duplicate key value violates unique constraint "powa_extension_config_pkey" #26
Comments
Hi, the code is already suppose to handle INSERT vs UPDATE. It looks like something specific happened in your case since this code has been there for years and this is the first report about an issue. Can you share details on how you configure things and what lead to that error? |
The log shows an insert, not an insert or update. |
Yes, that's because powa-collector supports postgres down to 9.4 which isn't compatible with the ON CONFLICT clause. What I meant is that it does check and issue either an insert or an update: https://github.com/powa-team/powa-collector/blob/master/powa_collector/powa_worker.py#L233-L247 so something is broken in that logic, and I'm trying to understand the scenario that leads to it. |
This happend after registering 110 Servers at the same time. |
I see. at least that confirms the source of your slow down I will try to reproduce and otherwise distinguish the "null version" from the "no matching row for hypopg" that is probably the root issue here. |
I guess this is from powa_worker.py line 237. |
Duplicate Key Errors in powa_catalog_generic_snapshot at line 64: |
This one looks really suspicious, the function |
Yeah, sorry, edited the comment just now. |
The row doesn't exist: |
Same for |
then it means it was present twice in the associated src table. can you check if that's the case? if yes there are two possible explanations for that:
|
Sorry, |
no worries. you could still check if the problematic oids are present twice on the remote database(s). you may need to check forcing a sequential scan. |
powa-collector 1.3.0-1.pgdg110+1
The hypopg version remains null, this should be an update or an insert on conflict update:
ERROR: duplicate key value violates unique constraint "powa_extension_config_pkey"
app=PoWA collector - repo_conn for worker commhistoryservice-pg-pro DETAIL: Key (srvid, extname)=(2, hypopg) already exists.
app=PoWA collector - repo_conn for worker commhistoryservice-pg-pro STATEMENT:
INSERT INTO public.powa_extension_config
(srvid, extname, version)
VALUES (2, 'hypopg', ('1.4.1'))
The text was updated successfully, but these errors were encountered: