Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com> writes:
> When I try to make a dump of a database I get the error pg_dump: schema with
> OID 0 does not exist. How can I find the schema with this OID?
Well, you can't, because it doesn't exist ;-). What you need to find
out is what is trying to reference it. I'd start by looking for a zero
in one of the catalog columns that reference pg_namespace.oid, such as
pg_class.relnamespace.
regards, tom lane