You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2026/01/06 04:20:49 UTC
[I] Errors in logs when upgrading to 6.0.0: psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index" [superset]
sfirke opened a new issue, #36910:
URL: https://github.com/apache/superset/issues/36910
### Bug description
Upon upgrading to 6.0.0, I see a few instances of this at first startup:
```
superset_worker_beat | 2026-01-06 04:10:45,663:ERROR:superset.app:Failed to create app
superset_worker_beat | Traceback (most recent call last):
superset_worker_beat | File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
superset_worker_beat | self.dialect.do_execute(
superset_worker_beat | File "/app/.venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
superset_worker_beat | cursor.execute(statement, parameters)
superset_worker_beat | psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
superset_worker_beat | DETAIL: Key (relname, relnamespace)=(ab_group_id_seq, 2200) already exists.
```
Superset then seems to work normally, though I haven't tried out the group functionality so it's possible this indicates a problem there.
Doesn't seem to be causing me a problem but I wanted to open this issue in case others have this experience too. If it goes stale, we can convert to discussion.
### Screenshots/recordings
_No response_
### Superset version
6.0.0
### Python version
I don't know
### Node version
I don't know
### Browser
Not applicable
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Errors in logs when upgrading to 6.0.0: psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index" [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #36910:
URL: https://github.com/apache/superset/issues/36910#issuecomment-4748830344
These appear to be harmless first-startup races on sequence creation (managed by Flask-AppBuilder/SQLAlchemy) that resolve on subsequent boots. Closing for now, but please reopen if you see a functional impact beyond the startup log noise.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Errors in logs when upgrading to 6.0.0: psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index" [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #36910: Errors in logs when upgrading to 6.0.0: psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
URL: https://github.com/apache/superset/issues/36910
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Errors in logs when upgrading to 6.0.0: psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "pg_class_relname_nsp_index" [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #36910:
URL: https://github.com/apache/superset/issues/36910#issuecomment-3713058445
<!-- Answer -->
This error happens when the upgrade process tries to create the ab_group_id_seq sequence, but it already exists in your database. This is managed by Flask-AppBuilder/SQLAlchemy, not by explicit Superset code or migrations. It's likely a side effect of how the migration or ORM tool interacts with your existing schema, not a bug in Superset itself. As long as Superset starts and works normally, this error is usually harmless and shouldn't affect group functionality, but it's a good idea to test creating and managing groups to be sure.
If you see any issues with groups or permissions, running `superset db upgrade` can help ensure all migrations are applied correctly and database objects are in sync. Manual sequence creation is discouragedālet the migration scripts handle it for you. Similar sequence-related issues have been resolved this way in the past ([example](https://github.com/apache/superset/issues/33347)). If everything works, you can safely ignore the error, but keep an eye out for any group-related problems after the upgrade.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/084da900-b988-4230-8276-45c90773c42f?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20error%20happens%20when%20the%20upgrade%20process%20tries%20to%20create%20the%20ab_group_id_seq%20sequence%2C%20but%20it%20already%20exists%20in%20your%20database.%20This%20is%20managed%20by%20Flask-AppBuilder/SQLAlchemy%2C%20not%20by%20explicit%20Superset%20code%20or%20migrations.%20It%27s%20likely%20a%20side%20effect%20of%20how%20the%20migration%20or%20ORM%20tool%20interacts%20with%20your%20existing%20schema%2C%20not%20a%20bug%20in%20Superset%20itself.%20As%20long%20as%20Superset%20starts%20and%20works%20normally%2C%20this%20error%20is%20usually%20harmless%20and%20shouldn%27t%20affect%20group%20functionality%2C%20but%20it%27s%20a%20good%20idea%20to%20test%20creating%20and%20managing%20groups%20to%20be%20sure.%0A%0AIf%20you%20see%20any%20iss
ues%20with%20groups%20or%20permissions%2C%20running%20%60superset%20db%20upgrade%60%20can%20help%20ensure%20all%20migrations%20are%20applied%20correctly%20and%20database%20objects%20are%20in%20sync.%20Manual%20sequence%20creation%20is%20discouraged%E2%80%94let%20the%20migration%20scripts%20handle%20it%20for%20you.%20Similar%20sequence-related%20issues%20have%20been%20resolved%20this%20way%20in%20the%20past%20%28%5Bexample%5D%28https%3A//github.com/apache/superset/issues/33347%29%29.%20If%20everything%20works%2C%20you%20can%20safely%20ignore%20the%20error%2C%20but%20keep%20an%20eye%20out%20for%20any%20group-related%20problems%20after%20the%20upgrade.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/3691
0)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org