How can I drop all tables in QuestDB?

60 Views Asked by At

I tried to drop all tables but received following error:

failed to drop tables ['telemetry': [-1] could not lock 'telemetry' [reason='telemetry']]

How can I drop all tables?

1

There are 1 best solutions below

0
On

By default, DROP ALL TABLES command skips all locked tables so if only 'telemetry' table is mentioned, then command has successfully removed all regular user tables.

This unnecessary error is related to the fact that when telemetry functionality is enabled, dropping telemetry table is not possible because it's being used all the time.

To actually drop the table, one needs to disable the functionality and restart QuestDB instance, as mentioned in documentation