Description

During a backup (using PGADMIN III or pg_dump) the following error occurs:

schema with OID xxxxxx does not exist



 
Applicable in CAST Version
Release
Yes/No
8.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
CSS(tick)
Step by Step scenario
  1. Perform a backup of one database using PGADMIN or pg_dump
  2. The "schema with OID xxxxxx does not exist" is raised and stop the Backup
Cause

The error is due to a corrupted database for example because of a network failure while inserting data in Cast Storage Service or when dropping a schema.

Action Plan
  1. You need to delete rows on catalog tables where specified OID is specified. 

     select oid, nspname from pg_namespace where oid=xxxxxxx;

    The catalog pg_namespace stores namespaces. A namespace is the structure underlying SQL schemas.

    Status of the query

    If there is no rows raised, that means that the schema has been dropped. In that case, go to the point 2.

    If there is one row raised, then a solution is to perform a component reinstall. You don't need to go to the point 2.

  2. If there are no entries when the above query is run, it means that this namespace has been removed from the Server. Then we assume that some entries in the following system catalog are corrupted. You have to remove the rows that are raised in the following queries 
    1.  select * from pg_type where typnamespace=xxxxxxx; 


      The catalog pg_type stores information about data types. Base types and enum types (scalar types) are created with CREATE TYPE, and domains with CREATE DOMAIN

    2.  select * from pg_class where  relnamespace = xxxxxxx; 


      The catalog pg_class catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (but see also pg_index), sequences, views, composite types, and TOAST tables

    3.  select * from pg_operator where   oprnamespace = xxxxxxx; 


      The catalog pg_operator stores information about operators.

    4.  select * from pg_conversion where connamespace = xxxxxxx; 


      The catalog pg_conversion describes the available encoding conversion procedures

    5.  select * from pg_opclass where opcnamespace = xxxxxxx; 


      The catalog pg_opclass defines index access method operator classes.

    6.  select * from pg_aggregate where aggfnoid = xxxxxxx or aggtransfn  = xxxxxxx or aggfinalfn = xxxxxxx; 


      The catalog pg_aggregate stores information about aggregate functions. An aggregate function is a function that operates on a set of values (typically one column from each row that matches a query condition) and returns a single value computed from all these values. Typical aggregate functions are sumcount, and max

    7.  select * from pg_proc where pronamespace = xxxxxxx;


      The catalog pg_proc stores information about functions (or procedures). 


--> Delete rows where oid xxxxxx appears and re-execute the backup in PGADMIN or pg_dump, it should work. 

Notes / Comments


Related Pages