hello list,
i am facing problem while dumping a database. Here the error i am getting
# /usr/local/pgsql/bin/pg_dump -U postgres ihm > ihm.sql
pg_dump: schema with OID 0 does not exist
#
i also tried dumping data-only but same error.
After googlging about the issue and checking the pg_catalogs i found
that pg_operator is having two null records
# /usr/local/pgsql/bin/psql -U postgres -d ihm
ihm=# select * from pg_operator where oprnamespace is null;
oprname | oprnamespace | oprowner | oprkind | oprcanhash | oprleft |
oprright | oprresult | oprcom | oprnegate | oprlsortop | oprrsortop |
oprltcmpop | oprgtcmpop | oprcode | oprrest | oprjoin
---------+--------------+----------+---------+------------+---------+----------+-----------+--------+-----------+------------+------------+------------+------------+---------+---------+---------
| | | | | |
| | | | | |
| | | |
| | | | | |
| | | | | |
| | | |
(2 rows)
ihm=#
i think this is the cause of the problem or is it normal to have null
rows in pg_operator. I tired deleting them but when i try to do so the
connection is terminated.
ihm=# delete from pg_operator where oprnamespace is null;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
i also tried removing these rows by starting postgres in single user mode.
Am i correct in my approach to the problem or i am headed in wrong direction ?
If i am correct how can i delete these null records, i dont have any
idea how they get in there because table structure of pg_operator says
that all the fields are not null.
postgres version 8.1.0
please let me know if more information is required.
thanks
Sandeep