明らかに有効ではないタプルを生成しているOIDを持っています。Postgres: `キャッシュルックアップが制約34055で失敗しました。 '
これは、いくつかの\set VERBOSITY verbose
後psqlでテーブルを削除しようとしたとき、私は取得エラーです:
delete from my_table where my_column = 'some_value';
ERROR: XX000: cache lookup failed for constraint 34055
LOCATION: ri_LoadConstraintInfo, ri_triggers.c:2832
これは私がelsewhere見つけたものです。
2827 : /*
2828 : * Fetch the pg_constraint row so we can fill in the entry.
2829 : */
2830 548 : tup = SearchSysCache1(CONSTROID, ObjectIdGetDatum(constraintOid));
2831 548 : if (!HeapTupleIsValid(tup)) /* should not happen */
2832 0 : elog(ERROR, "cache lookup failed for constraint %u", constraintOid);
2833 548 : conForm = (Form_pg_constraint) GETSTRUCT(tup);
2834 :
2835 548 : if (conForm->contype != CONSTRAINT_FOREIGN) /* should not happen */
2836 0 : elog(ERROR, "constraint %u is not a foreign key constraint",
これは、OIDが他の場所で参照されていることを意味します。これらの他の場所はどこにありますか、誰かがこのようなものをどのようにきれいにするかを知っていますか?
私は本当にライン上/* should not happen */
コメント2831