Skip to content

duplicate key value violates unique constraint "oc_preferences_pkey" on every login #23213

Description

@spitzlei

Steps to reproduce

  1. Login to Owncloud Website
  2. Open postgresql Serverlog

Expected behaviour

No Error in logs

Actual behaviour

Logfile is being spammed with errors:
2016-03-14 09:48:10 GMT STATEMENT: INSERT INTO "oc_preferences" ("userid", "appid", "configkey", "configvalue") VALUES($1, $2, $3, $4)
2016-03-14 09:48:34 GMT ERROR: duplicate key value violates unique constraint "oc_preferences_pkey"
2016-03-14 09:48:34 GMT DETAIL: Key (userid, appid, configkey)=(testuser, files, quota) already exists.

(I already cleaned up the table, entries being set after next login. After logout und relogin Errors appear again).

Server configuration

Operating system:
Debian 8.3

Web server:
Package: apache2
Version: 2.4.10-10+deb8u1

Database:
Package: postgresql
Version: 9.4+165

PHP version:
Package: php5
Version: 5.6.17+dfsg-0+deb8u1

ownCloud version: (see ownCloud admin page)
9.0.0 (stable)

Updated from an older ownCloud or fresh install:
Update: 7 > 8 > 9

Where did you install ownCloud from:
deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /

Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:
Enabled:

  • activity: 2.2.1
  • calendar: 1.0
  • comments: 0.2
  • contacts: 1.0.0.0
  • dav: 0.1.5
  • external: 1.2
  • federatedfilesharing: 0.1.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_external: 0.5.2
  • files_pdfviewer: 0.8
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • notifications: 0.2.3
  • provisioning_api: 0.4.1
  • systemtags: 0.2
  • templateeditor: 0.1
  • updatenotification: 0.1.0
    Disabled:
  • encryption
  • user_external
  • user_ldap

The content of config/config.php:
{
"system": {
"instanceid": "_REMOVED",
"passwordsalt": "_REMOVED SENSITIVE VALUE
",
"trusted_domains": [
"_REMOVED"
],
"datadirectory": "/var/www/owncloud/data",
"dbtype": "pgsql",
"version": "9.0.0.19",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc
",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"installed": true,
"mail_from_address": "cloud",
"mail_smtpmode": "php",
"mail_domain": "_REMOVED",
"forcessl": true,
"theme": "",
"maintenance": false,
"secret": "_REMOVED SENSITIVE VALUE
",
"loglevel": 2,
"memcache.local": "\OC\Memcache\APC",
"trashbin_retention_obligation": "auto",
"updatechecker": false
}
}

Are you using external storage, if yes which one:
No

Are you using encryption:
no

Are you using an external user-backend, if yes which one:
no

Client configuration

Browser:
Firefox 45

Operating system:
Debian 8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions