From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>
> > Is it enough for me to log on to each of my databases as user
> > postgres, and execute the query "update pg_type set typowner=31
> > where typowner=103;" to fix this problem? Are there any other
> > hidden databases I should fix besides template1?
>
> Aside from pg_type, you probably have bogus values in the owner columns
> for pg_class, pg_function, pg_operator, etc etc. It'd be a lot easier
> to create another user with sysid = 103 ...
Yup, you were right. In fact, about half of the the system tables
are owned by 103 (the other half are owned by 31):
template1=> \dS
List of relations
Name | Type | Owner
----------------+---------+----------------
pg_aggregate | table | postgres-badid
pg_am | table | postgres-badid
pg_amop | table | postgres-badid
pg_amproc | table | postgres-badid
pg_attrdef | table | postgres
pg_attribute | table | postgres
pg_class | table | postgres
pg_database | table | postgres
pg_description | table | postgres-badid
pg_group | table | postgres
pg_index | table | postgres-badid
pg_indexes | view | postgres
pg_inheritproc | table | postgres-badid
pg_inherits | table | postgres-badid
pg_ipl | table | postgres-badid
pg_language | table | postgres-badid
pg_largeobject | table | postgres-badid
pg_listener | table | postgres-badid
pg_log | special | postgres
pg_opclass | table | postgres-badid
pg_operator | table | postgres-badid
pg_proc | table | postgres
pg_relcheck | table | postgres
pg_rewrite | table | postgres-badid
pg_rules | view | postgres
pg_shadow | table | postgres
pg_statistic | table | postgres-badid
pg_tables | view | postgres
pg_trigger | table | postgres
pg_type | table | postgres
pg_user | view | postgres
pg_variable | special | postgres
pg_views | view | postgres
pg_xactlock | special | postgres
(34 rows)
Thanks for the help, Tom.
- Marc