Matthew <matt@ctlno.com> writes:
> -- dumping out user-defined functions
> failed sanity check, type with oid 101993741 was not found
Looks like you have a function that refers to a since-deleted type.
You'll need to find and drop the function (which may mean manually
deleting its pg_proc row, since there's no way to name the function
to DROP FUNCTION if one of its parameters is a now-unknown type).
Another possibility is that the type still exists but you deleted its
owning user from pg_shadow; that will confuse pg_dump too. In that
case you can just create a new user with the same usesysid, or you can
update the type's typowner field in pg_type to refer to some existing
user.
Try "select * from pg_type where oid = 101993741" to figure out which
situation applies ...
regards, tom lane