Update to version 6.11 failing: tc_actions is already a hypertable

Maarten Ureel 23 days ago

Version 6.11 is not starting on my Docker swarm:

Running Changeset: changelog-6.11.0::changelog-6.11.0-timescale::author
extension "timescaledb" already exists, skipping
constraint "tc_actions_pkey" of relation "tc_actions" does not exist, skipping
UPDATE SUMMARY
Run:                          0
Previously run:              28
Filtered out:                 0
-------------------------------
Total change sets:           31
ERROR: Exception Details
ERROR: Exception Primary Class:  PSQLException
ERROR: Exception Primary Reason:  ERROR: table "tc_actions" is already a hypertable
ERROR: Exception Primary Source:  PostgreSQL 17.5 (Ubuntu 17.5-1.pgdg22.04+1)

I have now fixed my tag to 6.10 and that remains to work.

Any tips?

Anton Tananaev 23 days ago

The problem is that you upgraded to 6.11.0 first, which had an issue. You should restore the database and upgrade directly to 6.11.1.

Maarten Ureel 23 days ago

Oops.. no manual fix possible? I am running just the latest tag and it happened automatically.
I do not have a backup of the previous version...

If it's not possible to fix manually I will just remove and recreate the database, I am still evaluating / testing Traccar and devices.

Anton Tananaev 23 days ago

You can fix it manually. You need to recreate the tc_actions as a normal table.

Maarten Ureel 23 days ago

I tried but that did not help me. So I just destroyed the database, recreated an empty one, but using the latest docker tag I still get the same error.

Also explicitly using 6.11.1 as docker tag results in the same error.

So essentially I now get this error on a fresh install of 6.11.1.

Anton Tananaev 23 days ago

I know for a fact that a clean TimescaleDB database works correctly with 6.11.1 because we already deployed quite of few servers with this version.

Maarten Ureel 23 days ago

OK; I started it with a new seperate postgres container instead of using my existing cluster and it worked. So there is probably something left in the database that is not deleted. I'll figure it out.

Thanks!

serkan karaot 3 days ago

Hi Anton Tananaev, we have same problem

ERROR: Exception Details
Jan 02 traccar[52843]: ERROR: Exception Primary Class:  PSQLException
Jan 02 traccar[52843]: ERROR: Exception Primary Reason:  ERROR: table "tc_actions" is already a hypertable

We have same problem.
I upgraded to version 6.11.1 following your suggestion, but the same error persists with postgre16+pgboncer and timescledb variations in 6.11.1.

Anton Tananaev 3 days ago

The issue is that you installed 6.11.0 first.

serkan karaot 9 hours ago

We expect a high number of devices, so we considered and set up the database and application as separate servers. After the error I received, we upgraded PS16 to PS17, and ran traccar again with 6.11.1, but the error persisted. So, what would your "The issue is that you installed 6.11.0 first." suggestion be in this situation?

Anton Tananaev 8 hours ago

Suggestion is to restore the database before 6.11.0 upgrade and upgrade directly to 6.11.1.