Closed adeifeadekunbi closed 3 months ago
Hi @adeifeadekunbi,
Thanks for reaching out. The job -1
should not be used by regular jobs. As you checked, this job is also not configured in your system. So, the table _timescaledb_internal.bgw_job_stat
seems to be in an inconsistent state. Could you delete the record from _timescaledb_internal.bgw_job_stat
and try to execute the upgrade again?
I deleted the record on _timescaledb_internal.bgw_job_stat
and the upgrade was successful but is it save to delete such records in production environment?
\dx timescaledb
List of installed extensions
Name | Version | Schema | Description
-------------+---------+--------+-------------------------------------------------------------------
timescaledb | 2.14.2 | public | Enables scalable inserts and complex queries for time-series data
(1 row)
Hi @adeifeadekunbi,
I recommend making manual changes in the catalog only when necessary. In this case, an inconsistency needs to be resolved before the upgrade can be performed. The upgrade will also add a constraint to the table to prevent similar inconsistencies in more recent versions.
Ok noted. Thank so much for help and swift response.
What type of bug is this?
Other
What subsystems and features are affected?
Background worker, Other
What happened?
I ran below command to upgrade 2.10.1 version to 2.14.2
sudo yum install timescaledb-2-postgresql-14-2.14.2 -y
After successfully run of the above command and restart of postgresql, i ran the the below commandpsql -X -c "ALTER EXTENSION timescaledb UPDATE" database_name;
The above update command failed with errorFurther investigation shows that bgw_job_stat table has a job_id = -1 while bgw_job table has no id = -1
How can this be resolved?
TimescaleDB version affected
2.10.1
PostgreSQL version used
14.6
What operating system did you use?
Centos 7.9
What installation method did you use?
RPM
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
No response
How can we reproduce the bug?