This section contains some ideas for troubleshooting common problems experienced with hypertables.
ERROR: cannot add column with constraints or defaults to a hypertable that has compression enabled
If you attempt to add a column with constraints or defaults to a hypertable that has compression enabled, you might get this error. To add the column, you need to decompress the data in the hypertable, add the column, and then compress the data.Products:
ERROR: must be owner of hypertable "HYPERTABLE_NAME"
If you attempt to compress or decompress a chunk with a non-privileged user
account, you might get this error. To compress or decompress a chunk, your user
account must have permissions that allow it to perform
CREATE INDEX on the
chunk. You can check the permissions of the current user with this command at
psql command prompt:
To resolve this problem, grant your user account the appropriate privileges with this command:
GRANT PRIVILEGESON TABLE <TABLE_NAME>TO <ROLE_TYPE>;
For more information about the
GRANT command, see the
When you drop a chunk, it requires an exclusive lock. If a chunk is being accessed by another session, you cannot drop the chunk at the same time. If a drop chunk operation can't get the lock on the chunk, then it times out and the process fails. To resolve this problem, check what is locking the chunk. In some cases, this could be caused by a continuous aggregate or other process accessing the chunk. When the drop chunk operation can get an exclusive lock on the chunk, it completes as expected.
For more information about locks, see the PostgreSQL lock monitoring documentation.Products:
ERROR: cannot create a unique index without the column "<COLUMN_NAME>" (used in partitioning)
You might get a unique index and partitioning column error in 2 situations:
- When creating a primary key or unique index on a hypertable
- When creating a hypertable from a table that already has a unique index or primary key
For more information on how to fix this problem, see the section on creating unique indexes on hypertables.Products:
ERROR: invalid attribute number -6 for _hyper_2_839_chunkCONTEXT: SQL function "hypertable_local_size" statement 1 PL/pgSQL function hypertable_detailed_size(regclass) line 26 at RETURN QUERY SQL function "hypertable_size" statement 1SQL state: XX000
You might see this error if your hypertable indexes have become very large. To resolve the problem, reindex your hypertables with this command:
reindex table _timescaledb_internal._hyper_2_1523284_chunk
For more information, see the hypertable documentation.Products:
Found an issue on this page?Report an issue!