We're Hiring!

Mattermost Discussion Forums

Postgres status problem

For feature requests, please see: Contributing Feature Proposals - Mattermost.

For troubleshooting questions, please post in the following format:

Summary
in the server logs I get errors indicating cant update status table in postgress due to unique constraint

Steps to reproduce
view server logs
Expected behavior
no errors
Observed behavior
{“level”:“warn”,“ts”:1629859589.495689,“caller”:“app/status.go:328”,“msg”:“Failed to save status”,“user_id”:“hk5toirzyir99b5zfido5ux9ey”,“error”:“failed in save Status: pq: duplicate key value violates unique constraint “idx_57521_primary””,“errorVerbose”:“pq: duplicate key value violates unique constraint “idx_57521_primary”\nfailed in save Status\ngithub.com).SaveOrUpdate\n\tgithub.com/mattermost/mattermost-server/v5/store/retrylayer/retrylayer.go:8303\ngithub.com/mattermost/mattermost-server/v5/store/timerlayer.(*TimerLayerStatusStore).SaveOrUpdate\n\tgithub.com/mattermost/mattermost-server/v5/store/timerlayer/timerlayer.go:6894\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SaveAndBroadcastStatus\n\tgithub.com/mattermost/mattermost-server/v5/app/status.go:327\ngithub.com/mattermost/mattermost-server/v5/app.(*App).SetStatusOffline\n\tgithub.com/mattermost/mattermost-server/v5/app/status.go:250\ngithub.com/mattermost/mattermost-server/v5/app.(*Hub).Start.func1.1\n\tgithub.com/mattermost/mattermost-server/v5/app/web_hub.go:488\ngithub.com/mattermost/mattermost-server/v5/app.(*Server).Go.func1\n\tgithub.com/mattermost/mattermost-server/v5/app/server.go:1133\nruntime.goexit\n\truntime/asm_amd64.s:1374”}