Re: postgres catalog files problem

Поиск
Список
Период
Сортировка
От Josh Harrison
Тема Re: postgres catalog files problem
Дата
Msg-id 8d89ea1d0709170957j484d6df2m1fccd77342ba3b13@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres catalog files problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: postgres catalog files problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: postgres catalog files problem  (Erik Jones <erik@myemma.com>)
creation of tables with warnings  (SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com>)
Список pgsql-general
Hi,
Yes...there is a relation in pg_class with the name 'payment' but its oid is not 672178. So why is it giving me "could not open relation with OID 672178" when i try an update statement ?
I use version 8.2. I think the problem started when i manually deleted some rows from the pg_class catalog file instead of using 'drop table' sql command. Do you think this created the problem?

Thanks
josh

On 9/17/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Josh Harrison" <joshques@gmail.com> writes:
> When i try to give this query

> UPDATE payment
> SET desc='New description'
> WHERE payment_id='xyz'

> I got the error
> ERROR: could not open relation with OID 672178

Hmm, there apparently *is* a pg_class row for relation 'payment', else
you'd not get this far, and I'll bet it's got OID 672178 --- try "select
oid from pg_class where relname = 'payment'" to see.  If so, it seems
likely that this is just an index corruption and you can get out of it
by REINDEXing pg_class_oid_index.  Depending on what PG version you are
using, that may require special setup --- read the REINDEX reference
page *for your version* before proceeding.

What version is it, anyway, and what were you doing before you got this
error the first time?  This isn't exactly an everyday type of problem.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgres catalog files problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgres catalog files problem