[Bucardo-general] Failed to add sync due to deadlock

Devon Campbell devon.campbell at gridsmart.com
Wed Nov 8 14:57:42 UTC 2017


[https://tr.cloudmagic.com/h/v6/emailtag/tag/2.0/1510153048/2cbd39c66fcfc343d910fdfec2b99201/11/dc8b3cf9139fd89dbdc85bccda7270cb/84db4021679463dae14a780c1debdaeb/b64260e64d9ebd03742d415f7c33d197/newton.gif]
I’m trying to replicate a database with Bucardo. When I try to add a sync, I get ERROR: deadlock detected.

I’ve provided the output of bucardo list all and the PostgreSQL logs of a few attempts below. Thank you for your help!

bucardo list all (obfuscated):
-- customcodes:
There are no entries in the 'customcode' table.
-- customnames:
No customnames have been added yet
-- customcols:
No customcols have been added yet
-- dbgroups:
No dbgroups have been added yet
-- databases:
Database: dest_db    Status: active  Conn: psql -p 5432 -U ****** -d ****** -h ******
Database: source_db  Status: active  Conn: psql -p 5432 -U ****** -d ****** -h ******
-- relgroup:
Relgroup: copying_herd  DB: source_db  Members: public.agsfiles, public.archivedunits, public.availablemodules, public.awsdms_ddl_audit, public.cameras, public.cameratypes, public.datauploadrequests, public.datauploads, public.days_uploaded_cache, public.demo_image_sets, public.demo_instances, public.demo_sites, public.demo_software_versions, public.developmentprocessors, public.emailverifications, public.event_log, public.groupmemberships, public.grouppermissions, public.groups, public.heartbeatcache, public.ignoredsiteids, public.licensedmodules, public.licenserequests, public.logs, public.pendingusers, public.permissions, public.pgmigrations, public.processors, public.session, public.site_versions, public.sitecameras, public.siteevents, public.siteinfo, public.sites, public.supportfileperms, public.supportfiles, public.teamconfirmations, public.teammembers, public.teams, public.teamsites, public.tokens, public.userlicenserequests, public.userpermissions, public.users, public.usersinfo, public.userssites
-- syncs:
No syncs found
-- tables:
47. Table: public.agsfiles                DB: source_db  PK: id (text)
87. Table: public.archivedunits           DB: source_db  PK: id (integer)
49. Table: public.availablemodules        DB: source_db  PK: id (integer)
90. Table: public.awsdms_ddl_audit        DB: source_db  PK: c_key (bigint)
83. Table: public.cameras                 DB: source_db  PK: id (text)
52. Table: public.cameratypes             DB: source_db  PK: type (text)
50. Table: public.datauploadrequests      DB: source_db  PK: id (integer)
48. Table: public.datauploads             DB: source_db  PK: id (integer)
91. Table: public.days_uploaded_cache     DB: source_db  PK: date (date)
51. Table: public.demo_image_sets         DB: source_db  PK: id (integer)
84. Table: public.demo_instances          DB: source_db  PK: id (text)
55. Table: public.demo_sites              DB: source_db  PK: id (integer)
64. Table: public.demo_software_versions  DB: source_db  PK: version (text)
54. Table: public.developmentprocessors   DB: source_db  PK: id (text)
56. Table: public.emailverifications      DB: source_db  PK: id (integer)
58. Table: public.event_log               DB: source_db  PK: event_id (bigint)
59. Table: public.groupmemberships        DB: source_db  PK: userid|groupid (integer|int4)
60. Table: public.grouppermissions        DB: source_db  PK: id (integer)
57. Table: public.groups                  DB: source_db  PK: id (integer)
53. Table: public.heartbeatcache          DB: source_db  PK: id (integer)
61. Table: public.ignoredsiteids          DB: source_db  PK: id (text)
62. Table: public.licensedmodules         DB: source_db  PK: id (integer)
63. Table: public.licenserequests         DB: source_db  PK: id (integer)
66. Table: public.logs                    DB: source_db  PK: id (integer)
65. Table: public.pendingusers            DB: source_db  PK: id (integer)
74. Table: public.permissions             DB: source_db  PK: id (integer)
68. Table: public.pgmigrations            DB: source_db  PK: id (integer)
88. Table: public.processors              DB: source_db  PK: hardwareid (text)
89. Table: public.session                 DB: source_db  PK: sid (varchar)
92. Table: public.site_versions           DB: source_db  PK: site_id|version (text|integer)
72. Table: public.sitecameras             DB: source_db  PK: siteid|cameraid (text|text)
85. Table: public.siteevents              DB: source_db  PK: id (integer)
67. Table: public.siteinfo                DB: source_db  PK: siteid (text)
70. Table: public.sites                   DB: source_db  PK: id (text)
69. Table: public.supportfileperms        DB: source_db  PK: id (integer)
71. Table: public.supportfiles            DB: source_db  PK: id (integer)
73. Table: public.teamconfirmations       DB: source_db  PK: teamname|userid (text|integer)
79. Table: public.teammembers             DB: source_db  PK: teamname|userid (text|integer)
86. Table: public.teams                   DB: source_db  PK: name (text)
76. Table: public.teamsites               DB: source_db  PK: teamname|siteid|userid (text|text|integer)
78. Table: public.tokens                  DB: source_db  PK: id (uuid)
75. Table: public.userlicenserequests     DB: source_db  PK: id (integer)
77. Table: public.userpermissions         DB: source_db  PK: id (integer)
82. Table: public.users                   DB: source_db  PK: id (integer)
81. Table: public.usersinfo               DB: source_db  PK: userid (integer)
80. Table: public.userssites              DB: source_db  PK: id (integer)
-- sequences:
There are no sequences.

PostgreSQL logs (obfuscated):
2017-11-08 14:27:01 UTC [31298-1] bucardo at bucardo LOG:  Starting validate_sync for the_sync
2017-11-08 14:27:01 UTC [31298-2] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:27:01 UTC [31298-3] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (name,dbs,onetimecopy,herd) VALUES ($1,$2,$3,$4)
2017-11-08 14:27:13 UTC [31298-4] bucardo at bucardo WARNING:  Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=******;host=******;port=5432 at line 29.
2017-11-08 14:27:13 UTC [31298-5] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:27:13 UTC [31298-6] bucardo at bucardo ERROR:  DBD::Pg::db do failed: ERROR:  deadlock detected
DETAIL:  Process 30403 waits for AccessExclusiveLock on relation 17263 of database 16390; blocked by process 30288.
Process 30288 waits for AccessShareLock on relation 17064 of database 16390; blocked by process 30403.
HINT:  See server log for query details. at line 132. at line 30.
2017-11-08 14:27:13 UTC [31298-7] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
2017-11-08 14:27:13 UTC [31298-8] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (name,dbs,onetimecopy,herd) VALUES ($1,$2,$3,$4)
2017-11-08 14:33:31 UTC [31321-1] bucardo at bucardo LOG:  Starting validate_sync for the_sync
2017-11-08 14:33:31 UTC [31321-2] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:33:31 UTC [31321-3] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (name,onetimecopy,herd,dbs) VALUES ($1,$2,$3,$4)
2017-11-08 14:33:41 UTC [31321-4] bucardo at bucardo WARNING:  Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=******;host=******;port=5432 at line 29.
2017-11-08 14:33:41 UTC [31321-5] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:33:41 UTC [31321-6] bucardo at bucardo ERROR:  DBD::Pg::db do failed: ERROR:  deadlock detected
DETAIL:  Process 30577 waits for AccessExclusiveLock on relation 17250 of database 16390; blocked by process 30581.
Process 30581 waits for AccessShareLock on relation 17188 of database 16390; blocked by process 30577.
HINT:  See server log for query details. at line 132. at line 30.
2017-11-08 14:33:41 UTC [31321-7] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
2017-11-08 14:33:41 UTC [31321-8] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (name,onetimecopy,herd,dbs) VALUES ($1,$2,$3,$4)
2017-11-08 14:37:25 UTC [31412-1] bucardo at bucardo LOG:  Starting validate_sync for the_sync
2017-11-08 14:37:25 UTC [31412-2] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:37:25 UTC [31412-3] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (dbs,name,herd,onetimecopy) VALUES ($1,$2,$3,$4)
2017-11-08 14:37:38 UTC [31412-4] bucardo at bucardo WARNING:  Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=******;host=******;port=5432 at line 29.
2017-11-08 14:37:38 UTC [31412-5] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('the_sync')"
PL/Perl function "validate_sync"
2017-11-08 14:37:38 UTC [31412-6] bucardo at bucardo ERROR:  DBD::Pg::db do failed: ERROR:  deadlock detected
DETAIL:  Process 30778 waits for AccessExclusiveLock on relation 17263 of database 16390; blocked by process 30751.
Process 30751 waits for AccessShareLock on relation 17064 of database 16390; blocked by process 30778.
HINT:  See server log for query details. at line 132. at line 30.
2017-11-08 14:37:38 UTC [31412-7] bucardo at bucardo CONTEXT:  PL/Perl function "validate_sync"
2017-11-08 14:37:38 UTC [31412-8] bucardo at bucardo STATEMENT:  INSERT INTO bucardo.sync (dbs,name,herd,onetimecopy) VALUES ($1,$2,$3,$4)

Devon Campbell | Web Services Developer
+1 865 482 2112<tel:+1%20865%20482%202112> (office) | +1 865 368 9122<tel:+1%20865%20368%209122> (mobile)
3220 California Ave SW #300, Seattle, WA 98116<x-apple-data-detectors://0/3> (mailing)
10545 Hardin Valley Rd, Knoxville, TN 37932<x-apple-data-detectors://1> (office)
GRIDSMART Technologies, Inc. | gridsmart.com<http://gridsmart.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20171108/32759108/attachment-0001.html>


More information about the Bucardo-general mailing list