У меня есть OID, который генерирует кортеж, который, очевидно, недействителен.Postgres: `cache lookup failed for constraint 34055`
Это ошибка я получаю при попытке удалить таблицу в PSQL после некоторого \set VERBOSITY verbose
:
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