Corrupt index lead to skipped autovacuum

From: 高偉鈞 <weichun(at)bebit-tech(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Corrupt index lead to skipped autovacuum
Date: 2024-12-24 05:43:00
Message-ID: CAFRUeZvUxZwRdsjFf1B3Cti+1-uW7WvmGwSOEvx0qv1TAqX=+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Postgres version: postgres (PostgreSQL) 16.3 (Ubuntu 16.3-1.pgdg20.04+1)
Related extension: vector | 0.6.2 | public | vector data
type and ivfflat and hnsw access methods

We have a database running with vector extension and somehow one of the
index is corrupted. During autovacuum the following message shows up:

different vector dimensions 256 and 0
while vacuuming index "ai_user_embedding_idx" of relation
"public.ma_ai_aiuser"
automatic vacuum of table "analytics_vector.public.ma_ai_aiuser"

The problem is that after this error, the autovacuum process seems to stop
here. All other tables and indexes are left unvacuumed even if they already
exceed emergency vacuum threshold. Once we reindex the index, autovacuum
starts to work properly.

We will expect the autovacuum will continue to vacuum other tables/indexes
and maybe mark the index as invalid? Skip vacuum for all other indexes /
tables can be quite dangerous if un-noticed.

Thanks!

* 高偉鈞|Wei-Chun Kao*

* 技術長|CTO*

T:(02) 2521-7375|M:0920-605-597

E:weichun(at)bebit-tech(dot)com

A:105402 台北市松山區民生東路三段109號17樓 (聯邦大廈)

17F., No. 109, Sec. 3, Minsheng E. Rd., Songshan Dist., Taipei City 105402,
Taiwan (R.O.C.)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2024-12-24 05:50:57 Re: BUG #18146: Rows reappearing in Tables after Auto-Vacuum Failure in PostgreSQL on Windows
Previous Message PG Bug reporting form 2024-12-24 04:36:40 BUG #18753: Unable to Recover a Deleted Database Using PITR