-
Notifications
You must be signed in to change notification settings - Fork 54
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
Meter import bug - postgres unique constraints removed from meterreading table #2096
Comments
Research Notes: This needs to be confirmed, but it's likely that dev1 experienced this bug as it's current DB was a restore of the production DB that's likely on < timescale v1.5.0. The bug fix requires that the dump was created with 1.5+. Additionally, dumps and restores should really be done with the same version to avoid corrupting the DB. Once confirmed, the first fix I'd like to attempt would be to upgrade the prod DB's timescaleDB, dump it, then restore it locally. If the unique constraint persists and meters can be imported without error a restore can be done for Extra details: |
@nllong -- is there anything for me to test for this issue? |
nope! closing. thanks! |
Expected Behavior
Meters and meter readings can be successfully imported.
Actual Behavior
An error is thrown within the dev1 database:
psycopg2.errors.InvalidColumnReference: there is no unique or exclusion constraint matching the ON CONFLICT specification
This was caused by a timescaledb version mismatch between
prod
(the dump source) anddev1
(the restore target). This mismatch caused the unique constraint to be lost (among other issues - see comment below).It was decided that the most appropriate solution was to upgrade
prod
to the latest timescaledb version 1.6.0, install that same version on dev1, and explicitly specify this version within deployment scripts and documentation.See comments for extra documentation from work-in-progress research.
Instance Information
Server Instance:
dev1
Server SHA:
74a0116d
The text was updated successfully, but these errors were encountered: