pg_get_constraintdef failing with cache lookup error

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pg_get_constraintdef failing with cache lookup error
Дата
Msg-id CAB7nPqRKCQkAwLNtccUTUPCdUjWSSNUKnzjdi=DpgP-etJ_OmA@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_get_constraintdef failing with cache lookup error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi all,

pg_get_constraintdef() fails rather easily:
=# select pg_get_constraintdef(1);
ERROR:  cache lookup failed for constraint 1
STATEMENT:  select pg_get_constraintdef(1);
ERROR:  XX000: cache lookup failed for constraint 1
LOCATION:  pg_get_constraintdef_worker, ruleutils.c:1305

Now by looking at pg_get_constraintdef_worker()@ruleutils.c it is
commented that this error should never happen:
        if (!HeapTupleIsValid(tup)) /* should not happen */
                elog(ERROR, "cache lookup failed for constraint %u",
constraintId);
But it happens.
Am I missing something? Shouldn't this error be changed into something
more informative?
Regards,
--
Michael

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Client deadlocks when connecting via ssl