Skip to content

cannot start (update schema) - duplicate entity #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jaakla opened this issue Oct 8, 2023 · 1 comment
Open

cannot start (update schema) - duplicate entity #141

jaakla opened this issue Oct 8, 2023 · 1 comment

Comments

@jaakla
Copy link

jaakla commented Oct 8, 2023

It seems that with schema/version update ltss startup fails and no data is recorded anymore. The latest row in ltss table is 2023-07-26 22:20:31.732 +0300 , so it may be related to not most recent update, but something released back in July.

Error:

Logger: custom_components.ltss
Source: custom_components/ltss/__init__.py:133
Integration: ltss ([documentation](https://github.com/freol35241/ltss))
First occurred: 11:05:58 AM (1 occurrences)
Last logged: 11:05:58 AM

Error during connection setup: (psycopg2.errors.UniqueViolation) could not create unique index "18_2428_ltss_pkey" DETAIL: Key ("time", entity_id)=(2022-04-01 11:13:10.023225+00, sun.sun) is duplicated. CONTEXT: SQL statement " ALTER TABLE _timescaledb_internal._hyper_1_18_chunk ADD CONSTRAINT "18_2428_ltss_pkey" PRIMARY KEY ("time", entity_id) " PL/pgSQL function _timescaledb_internal.chunk_constraint_add_table_constraint(_timescaledb_catalog.chunk_constraint) line 29 at EXECUTE [SQL: ALTER TABLE ltss DROP CONSTRAINT ltss_pkey CASCADE, ADD PRIMARY KEY(time,entity_id);] (Background on this error at: https://sqlalche.me/e/20/gkpj) (retrying in 3 seconds)
@gmarti
Copy link

gmarti commented Oct 8, 2023

Same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants