// troubleshooting guide · pgvector

pgvector "different vector dimensions" Error

Status
Workaround available
platforms:
n8n, LlamaIndex, Supabase
updated:
November 15, 2026
reports:
4
Method
how we research
Share

RUNBOOK · pgvector/different-vector-dimensions3 FIXES

// quick answer

The column is fixed width, so every vector must match it. Re-embed with one model or create a new column at the new size.

Most likely fix: Use one model per column

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Use one model per column

    1. 01Check the column with \d table
    2. 02Confirm your model's output size
    Did this fix it?
  2. FIX 2Add a column or table

    1. 01ALTER TABLE ADD COLUMN embedding2 vector(768)
    2. 02Re-embed rows and swap queries
    Did this fix it?
  3. FIX 3Re-embed everything

    1. 01Recreate the table at the new dimension
    2. 02Rebuild the index after loading
    Did this fix it?

Symptoms

ERROR: expected 1536 dimensions, not 768, or different vector dimensions 1536 and 768.

Why it happens

  • C-01Changed embedding model
  • C-02Tool created the table from the first model
  • C-03Mixed models in one table

// this guide also covers

  • different vector dimensions 1536 and 768
  • expected 1536 dimensions not 768
  • pgvector dimension mismatch

Still not working?

If pgvector keeps failing, you're not alone. See every pgvector problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch pgvector Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other pgvector errors

All 11 pgvector errors and fixes →