Chunk does not exist error from hypertable_size query

We periodically read the size of our hypertable using “SELECT hypertable_size(‘tablename’)”

Recently we ran into an error during the size query:

Npgsql.PostgresException (0x80004005): 42P01: relation "timescaledb_internal.hyper_117_27588_chunk" does not exist

We’re not sure if this is a problem internal to timescaledb or npgsql but it does seem like an internal problem. Has anyone seen this before? Is there a way to avoid or work around it? Knowing the table size is important, but recording data is more important to us.

Hi @mkbaker , have you seen if you have any background job that removed this one specifically?

Is it happening all the time?

Can you share what is the chunk time interval and the settings you have in the hypertable?

It doesn’t happen all the time. The process had been running without issue for a couple weeks. There is no background task that would target a specific chunk. We do have a retention policy, but I’m not sure when it kicks in or if there is any evidence that it is doing anything in our logging. Chunk time interval is one day. We have enabled compression (30 day interval), other than that not many settings.

Thanks

It looks like something is cached and need to be improved internally in the functions.

I’d recommend you to open a bug on the platform if you come up with any possible reproducible step.

@fabriziomello any ideas?