Search Postgresql Archives

dump error parent table oid of pg_rewrite entry oid not found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux