immich-app/immich · warning
Table does not exist, skipping reindexing. This is only…
Error message
Table ${table} does not exist, skipping reindexing. This is only normal if this is a new Immich instance. What it means
During vector-index reindexing (e.g. after switching pgvector/VectoRA extensions), the code queries information_schema for the target table and aborts if the table has no columns/does not exist yet. This is expected on a brand-new Immich instance where migration has not yet created the embeddings tables, so it logs a warning and skips reindexing instead of failing.
Solutions
- Start Immich normally and let migrations run — the next reindex attempt after migration will succeed
- Verify the database user can see the tables (correct database and schema in DB_URL)
- Manually run migrations (server restart triggers runMigrations) before changing the vector extension
- Ignore the warning if this is genuinely a new instance
Defensive patterns
Strategy: validation
Validate before calling
const { rows } = await db.schema.from('information_schema.columns').select('column_name')
.where('table_name', '=', 'smart_search').execute();
const tableReady = rows.length > 0;
if (!tableReady) throw new Error('smart_search table missing — run migrations before reindexing'); Try / catch
try {
await db.reindexVectorsIfNeeded();
} catch (err) {
if (isNewInstanceError(err)) logger.info('Skipping reindex on fresh instance');
else throw err;
} Prevention
- Always let migrations run to completion before changing the vector extension
- Point Immich at the correct database/schema in DB_URL
- Run migrations before any manual schema operations
- Don't run extension migrations against an empty/uninitialized database
When it happens
Trigger: reindexVectors is invoked (via updateVectorExtension or reindexVectorsIfNeeded) while the smart_search or face_search table does not exist in the database — typically before the initial migration ran.
Common situations: Fresh Immich container starting up before migrations create tables; pointing Immich at an empty database; changing the vector extension in an environment where schema init hasn't run.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Column 'embedding' does not exist in table
- Could not retrieve dimension size of column
- extension is not installed
- Migration " " failed
- Unsupported vector extension
AI-assisted analysis of immich-app/immich@e55ac299a4 (2026-09-15).
Data as JSON: /api/errors/4ea19ec6073bc1f9.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/repositories/database.repository.ts:222
}
}
}
if (promises.length > 0) {
await Promise.all(promises);
}
}
private async reindexVectors(indexName: VectorIndex, { lists }: { lists?: number } = {}): Promise<void> {
this.logger.log(`Reindexing ${indexName} (This may take a while, do not restart)`);
const table = VECTOR_INDEX_TABLES[indexName];
const vectorExtension = await getVectorExtension(this.db);
const { rows } = await sql<{
columnName: string;
}>`SELECT column_name as "columnName" FROM information_schema.columns WHERE table_name = ${table}`.execute(this.db);
if (rows.length === 0) {
this.logger.warn(
`Table ${table} does not exist, skipping reindexing. This is only normal if this is a new Immich instance.`,
);
return;
}
const dimSize = await this.getDimensionSize(table);
lists ||= this.targetListCount(await this.getRowCount(table));
await this.db.transaction().execute(async (tx) => {
await sql`DROP INDEX IF EXISTS ${sql.raw(indexName)}`.execute(tx);
if (table === 'smart_search') {
await sql`ALTER TABLE ${sql.raw(table)} DROP CONSTRAINT IF EXISTS dim_size_constraint`.execute(tx);
}
if (rows.every((row) => row.columnName !== 'embedding')) {
this.logger.warn(`Column 'embedding' does not exist in table '${table}', truncating and adding column.`);
await sql`TRUNCATE TABLE ${sql.raw(table)}`.execute(tx);
await sql`ALTER TABLE ${sql.raw(table)} ADD COLUMN embedding real[] NOT NULL`.execute(tx);
}
await sql`ALTER TABLE ${sql.raw(table)} ALTER COLUMN embedding SET DATA TYPE real[]`.execute(tx);
await sql`View on GitHub (pinned to e55ac299a4)