dump error parent table oid of pg_rewrite entry oid not found

Поиск
Список
Период
Сортировка
От Doug Kyle
Тема dump error parent table oid of pg_rewrite entry oid not found
Дата
Msg-id 4BBCE950.9070402@grpl.org
обсуждение исходный текст
Ответы Re: dump error parent table oid of pg_rewrite entry oid not found  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have this error from pg_dumpall:
pg_dump: failed sanity check, parent table OID 27974 of pg_rewrite entry
OID 28689 not found


I found a rule was dropped when this server was setup as s Slony replica
because it conflicted with the Slony deny access trigger
select oid,rulename from pg_rewrite where oid=28689;
  oid  |      rulename
-------+---------------------
 28689 | protect_user_delete

the other oid looks to be a key for the table the rule was dropped from:
select * from pg_class where oid=27974;
 relname  | relnamespace | reltype | relowner | relam | relfilenode |
reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid |
relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers
| relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules
| relhassubclass | relfrozenxid | relacl |
reloptions

----------+--------------+---------+----------+-------+-------------+---------------+----------+-----------+---------------+---------------+-------------+-------------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------------+--------+------------
                                       

 usr_pkey |        24604 |       0 |       10 |   403 |       32459
|             0 |     1256 |    924158 |             0 |             0 |
f           | f           | i       |        1 |         0 |           0
|        0 |        0 |       0 | f          | f          | f
| f              |            0 |        |



and there 50 references to these OIDs in pg_depend:
 select * from pg_depend where objid in (27974,28689) or refobjid in
(27974,28689);
 classid | objid | objsubid | refclassid | refobjid | refobjsubid |
deptype
---------+-------+----------+------------+----------+-------------+---------

    1259 | 27974 |        0 |       2606 |    27975 |           0 |
i
    2618 | 28689 |        0 |       1259 |    24985 |           0 |
a
    2618 | 28689 |        0 |       1259 |    24985 |           1 |
n
    2606 | 28731 |        0 |       1259 |    27974 |           0 | n
    2606 | 28756 |        0 |       1259 |    27974 |           0 | n
    2606 | 28771 |        0 |       1259 |    27974 |           0 | n
    2606 | 28786 |        0 |       1259 |    27974 |           0 | n
    2606 | 28791 |        0 |       1259 |    27974 |           0 | n
   <snip etc>

So I'm thinking I'll delete from pg_rewrite where oid=28689, but I'm not
sure if I should do anything with pg_class or pg_depends - or other
tables?  Any advice?

Doug.

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

Предыдущее
От: Tuo Pe
Дата:
Сообщение: Re: Problem either with PostgreSQL or with PHP (SOLVED!)
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Solid State Drives with PG