immich-app/immich · critical · Error
No available version for ${EXTENSION_NAMES[extension]} exten
Error message
No available version for ${EXTENSION_NAMES[extension]} extension What it means
In updateVectorExtension, after confirming the extension is installed, it checks availableVersion. If the Postgres catalog reports no available (upgradable) version for the extension, it throws No available version for <Name> extension. This indicates the catalog entry is incomplete or the extension packaging is broken.
Source
Thrown at server/src/repositories/database.repository.ts:132
const dbName = sql.id(await this.getDatabaseName());
await sql`ALTER DATABASE ${dbName} SET vchordrq.probes = 1`.execute(this.db);
await sql`SET vchordrq.probes = 1`.execute(this.db);
}
}
async dropExtension(extension: DatabaseExtension): Promise<void> {
this.logger.log(`Dropping ${EXTENSION_NAMES[extension]} extension`);
await sql`DROP EXTENSION IF EXISTS ${sql.raw(extension)}`.execute(this.db);
}
async updateVectorExtension(extension: VectorExtension, targetVersion?: string): Promise<void> {
const [{ availableVersion, installedVersion }] = await this.getExtensionVersions([extension]);
if (!installedVersion) {
throw new Error(`${EXTENSION_NAMES[extension]} extension is not installed`);
}
if (!availableVersion) {
throw new Error(`No available version for ${EXTENSION_NAMES[extension]} extension`);
}
targetVersion ??= availableVersion;
if (!semver.diff(installedVersion, targetVersion)) {
return;
}
await Promise.all([
this.db.schema.dropIndex(VectorIndex.Clip).ifExists().execute(),
this.db.schema.dropIndex(VectorIndex.Face).ifExists().execute(),
]);
await sql`ALTER EXTENSION ${sql.raw(extension)} UPDATE TO ${sql.lit(targetVersion)}`.execute(this.db);
await Promise.all([this.reindexVectors(VectorIndex.Clip), this.reindexVectors(VectorIndex.Face)]);
}
async prewarm(index: VectorIndex): Promise<void> {
const vectorExtension = await getVectorExtension(this.db);View on GitHub (pinned to 199723261c)
Solutions
- Reinstall the extension package cleanly (vectorchord or pgvector) in the Postgres image.
- Verify SELECT * FROM pg_available_extension_versions WHERE name = '<ext>'; returns a row with a version.
- Fall back to the official Immich Postgres image which ships a known-good extension.
Defensive patterns
Strategy: validation
Validate before calling
const res = await sql`SELECT version FROM pg_available_extension_versions WHERE name = '${ext}'`;
if (res.rows.length === 0) {
throw new Error(`No available version for ${ext}; reinstall the extension package.`);
} Prevention
- Install the full extension package (control file + shared library) cleanly.
- Use the official Immich Postgres image to avoid partial installs.
- Validate pg_available_extension_versions during image build.
When it happens
Trigger: The extension is installed but pg_available_extensions/pg_available_extension_versions does not expose a version for it — e.g. a partially installed extension, corrupted package, or a packaging bug in the Postgres image.
Common situations: Custom-built Postgres image with a half-installed extension; extension shared library missing while the control file exists; mismatch between extension versions shipped and expected.
Related errors
- ${EXTENSION_NAMES[extension]} extension is not installed
- No vector extension found. Available extensions: ${VECTOR_EX
- Invalid CLIP dimension size: ${dimSize}
- Migration "${missing[1]}" was already applied to this databa
- Unsupported PostgreSQL version: ${databaseVersion}
AI-assisted analysis of immich-app/immich@199723261c (2026-08-12).
Data as JSON: /api/errors/d4bcfa0d88e25cc7.
Report an issue: GitHub.