My Questdb table is suspended and I cannot resume it, how can I reset the errors?

I have a table in questdb and it is shown as a suspended table when I query

SELECT * from wal_tables()

I tried to resume with

ALTER TABLE trades RESUME WAL

but in a moment it changes the state back to suspended.

I think it started to happen after I ran an update statement and I now see some IdexOutOfBoundException exceptions in the server.log processing my update.

How can I ignore the offensive UPDATE and make the table accept the data again?

If a WAL table stuck on one of the transactions there is a way to clear all the pending transactions by converting it to Non-WAL and back. It needs restarts though. Try this:

ALTER TABLE trades SET TYPE BYPASS WAL

Then restart QuestDB server. This will convert table to a non-WAL type and clears all the transactions kept in WAL files. Then you can convert it back

ALTER TABLE trades SET TYPE WAL

And then restart again. At this point your table is back to normal, you can insert data into it.

These SET TYPE alters don’t have any effect until restart, the conversions happen at the server startup.