Skip to content

ERROR: duplicate key value violates unique constraint #3511

@ukcb

Description

@ukcb

Because of a small error in a database query, the whole etherpad server crashes.
It does not look very robust.

I use version 1.7 with postgresqlpool.

etherpad.log
....
[2018-11-04 16:09:13.999] [ERROR] console - error: duplicate key value violates unique constraint "store_pkey"
at Connection.parseE (/home/etherpad/etherpad-lite/src/node_modules/pg/lib/connection.js:569:11)
at Connection.parseMessage (/home/etherpad/etherpad-lite/src/node_modules/pg/lib/connection.js:396:17)
at Socket. (/home/etherpad/etherpad-lite/src/node_modules/pg/lib/connection.js:132:22)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
....
postgresql.log
....
2018-11-04 16:09:13 CET [29577-1] etherpad@etherpad ERROR: duplicate key value violates unique constraint "store_pkey"
2018-11-04 16:09:13 CET [29577-2] etherpad@etherpad DETAIL: Key (key)=(globalAuthor:a.xxxxxxxxxxxxxxx) already exists.
2018-11-04 16:09:13 CET [29577-3] etherpad@etherpad CONTEXT: SQL statement "INSERT INTO store(key,value) VALUES( $1, $2 )"
PL/pgSQL function ueberdb_insert_or_update(character varying,text) line 1 at SQL statement
2018-11-04 16:09:13 CET [29577-4] etherpad@etherpad STATEMENT: SELECT ueberdb_insert_or_update($1,$2)
....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions