{"record":{"id":"8f96790ae396e8d6","repo":"influxdata/influxdb","slug":"table-table-name-in-storage-mode-storage-mode-cannot","errorCode":null,"errorMessage":"table '{table_name}' in storage mode {storage_mode:?} cannot allocate more legacy column IDs","messagePattern":"table '(.+?)' in storage mode (.+?) cannot allocate more legacy column IDs","errorType":"error_code","errorClass":"CatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":166,"sourceCode":"    },\n\n    #[error(\n        \"Update to schema would exceed number of tables limit: attempted to create table but already have {current} table(s) (limit: {limit})\"\n    )]\n    TooManyTables { current: usize, limit: usize },\n\n    #[error(\"Adding a new database would exceed limit of {0} databases\")]\n    TooManyDbs(usize),\n\n    #[error(\n        \"Update to schema would exceed the field limit ({limit}) for field family '{field_family}'\"\n    )]\n    TooManyFields { field_family: String, limit: usize },\n\n    #[error(\"Update to schema would exceed the field family limit of {0}\")]\n    TooManyFieldFamilies(usize),\n\n    #[error(\n        \"table '{table_name}' in storage mode {storage_mode:?} cannot allocate more legacy column IDs\"\n    )]\n    LegacyColumnIdsExhausted {\n        table_name: Arc<str>,\n        storage_mode: StorageMode,\n    },\n\n    #[error(\"Database not found {}\", db_name)]\n    DatabaseNotFound { db_name: Arc<str> },\n\n    #[error(\"Table {} not in DB schema for {}\", table_name, db_name)]\n    TableNotFound {\n        db_name: Arc<str>,\n        table_name: Arc<str>,\n    },\n\n    #[error(\n        \"Field type mismatch on table {} column {}. Existing column is {} but attempted to add {}\",","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L148-L184","documentation":"Thrown when a table in legacy storage mode has exhausted its available legacy column IDs. Legacy mode allocates columns from a fixed-size ID space (u8/u16 era compatibility), so once all IDs are allocated, no new columns can be added to that table and this error is raised.","triggerScenarios":"Any schema update adding columns to a table whose `storage_mode` (reported in the error) is a legacy mode and whose legacy column ID pool is exhausted.","commonSituations":"Older tables created before the current storage engine's schema handling; instances upgraded from earlier InfluxDB 3 versions where tables remain in legacy mode; very wide legacy tables that slowly grew past the ID space.","solutions":["Migrate the table to the current (non-legacy) storage mode so columns get fresh IDs","Create a new table in the modern storage mode and backfill/migrate data","Reduce the table's column count by dropping unused columns","Upgrade the instance/replication path so new tables are not created in legacy mode"],"exampleFix":"// before: wide table still on legacy storage mode\n-- writes to 'metrics' keep failing with LegacyColumnIdsExhausted\nCREATE TABLE metrics_v2 (...); -- modern mode, migrate data\nINSERT INTO metrics_v2 SELECT * FROM metrics;","handlingStrategy":"try-catch","validationCode":"const table = await catalog.getTable(db, name);\nif (table.storageMode.isLegacy() && table.columnIdUsagePct > 90) {\n  // plan migration to modern storage mode before adding columns\n}","typeGuard":null,"tryCatchPattern":"try {\n  await write(points);\n} catch (e) {\n  if (String(e.message).includes('legacy column IDs')) {\n    await migrateTableToModernStorage(table);\n  } else throw e;\n}","preventionTips":["Migrate legacy-mode tables to the current storage mode before they grow wide","After version upgrades, audit tables still in legacy storage modes","Avoid adding columns opportunistically to very old tables"],"tags":["schema","storage-mode","legacy","catalog"],"backgroundTag":"invalid-state-transition","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}