Jira (PDB-4891) duplicate key value violates unique constraint

9 views
Skip to first unread message

zoen (Jira)

unread,
Sep 11, 2020, 5:33:04 AM9/11/20
to puppe...@googlegroups.com
zoen created an issue
 
PuppetDB / Bug PDB-4891
duplicate key value violates unique constraint
Issue Type: Bug Bug
Affects Versions: PDB 5.2.18
Assignee: Unassigned
Components: PuppetDB
Created: 2020/09/11 2:32 AM
Priority: High High
Reporter: zoen

- Ubuntu          18.04.4 LTS \n \l
- puppetdb        5.2.18-1bionic
- postgresql-9.6  9.6.18-1.pgdg18.04+1

time to time. We got this kind of error on our PostgreSQL. this errors also

2020-09-11 08:03:08 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:03:08 UTC DETAIL:  Key (resource)=(\xf5061d5d2ebebc3acd3682cf30649ded7de5a58f) already exists.
2020-09-11 08:03:08 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:04:14 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:14 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:14 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:14 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:14 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:14 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:14 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:14 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:38 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:38 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:38 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:38 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:38 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:38 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:39 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:04:39 UTC DETAIL:  Key (resource)=(\x68a902bee08b27a7787e6da9f6fff3071d6746f3) already exists.
2020-09-11 08:04:39 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:04:43 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:43 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:04:44 UTC ERROR:  could not serialize access due to concurrent update
2020-09-11 08:04:44 UTC STATEMENT:  INSERT INTO fact_paths ( path, value_type_id, path_array, name, depth ) VALUES ( $1, $2, $3, $4, $5 ) ON CONFLICT do nothing
        RETURNING *
2020-09-11 08:06:04 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:06:04 UTC DETAIL:  Key (resource)=(\x649da33e5958644dd934a500ed2aae6246a8da11) already exists.
2020-09-11 08:06:04 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:06:04 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:06:04 UTC DETAIL:  Key (resource)=(\x649da33e5958644dd934a500ed2aae6246a8da11) already exists.
2020-09-11 08:06:04 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:06:04 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:06:04 UTC DETAIL:  Key (resource)=(\x649da33e5958644dd934a500ed2aae6246a8da11) already exists.
2020-09-11 08:06:04 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:20:30 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:20:30 UTC DETAIL:  Key (resource)=(\xc3d98ded61e9f2c18e5af69e0c5ce80f8f988684) already exists.
2020-09-11 08:20:30 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:29:35 UTC ERROR:  duplicate key value violates unique constraint "resource_params_cache_pkey"
2020-09-11 08:29:35 UTC DETAIL:  Key (resource)=(\xaa31b2381596297884307ed66dcb93eb10c12730) already exists.
2020-09-11 08:29:35 UTC STATEMENT:  INSERT INTO resource_params_cache ( resource, parameters ) VALUES ( $1, $2 )
        RETURNING *
2020-09-11 08:54:26 UTC LOG:  unexpected EOF on client connection with an open transaction
2020-09-11 08:54:31 UTC LOG:  unexpected EOF on client connection with an open transaction
2020-09-11 08:54:32 UTC LOG:  unexpected EOF on client connection with an open transaction

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

zoen (Jira)

unread,
Sep 11, 2020, 5:35:03 AM9/11/20
to puppe...@googlegroups.com
zoen updated an issue
Change By: zoen
{noformat}

- Ubuntu          18.04.4 LTS \n \l
- puppetdb        5.2.18-1bionic
- postgresql-9.6  9.6.18-1.pgdg18.04+1
{noformat}

time to time. We got this kind of error on our PostgreSQL.
this even after updating(from 5.2.11-1bionic), the errors also
are still present.

{noformat}
{noformat}

Zachary Kent (Jira)

unread,
Sep 11, 2020, 12:34:04 PM9/11/20
to puppe...@googlegroups.com

could not serialize access due to concurrent update

The error above will occur when two transactions tried to update the same row and one wins and the other will then fail and get retried. Some level of these errors is normal and shouldn't be cause for alarm by itself. 

 

duplicate key value violates unique constraint "resource_params_cache_pkey"

We have also seen the error above in other installs before. That's the db enforcing a unique constraint on the resource_params_cache table. Some level of these errors is normal as well. 

 

Both of these errors don't indicate a problem by themselves, if they happen infrequently they're safe to ignore. 

Reply all
Reply to author
Forward
0 new messages