Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4NKGbA48612 for ; Wed, 23 May 2001 16:16:37 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f4NKGTR17303; Wed, 23 May 2001 16:16:29 -0400 (EDT) To: "Marc Sherman" cc: pgsql-admin@postgresql.org, "Oliver Elphick" Subject: Re: WARNING: owner of type appears to be invalid? In-reply-to: References: Comments: In-reply-to "Marc Sherman" message dated "Wed, 23 May 2001 15:52:01 -0400" Date: Wed, 23 May 2001 16:16:29 -0400 Message-ID: <17300.990648989@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/137 X-Sequence-Number: 1494 "Marc Sherman" writes: > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] >> Sounds like you have no pg_shadow entry for the postgres user. > No, that's not it: > template1=# select * from pg_shadow; > usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | > passwd | valuntil > ----------+----------+-------------+----------+----------+-----------+------ > --+---------- > postgres | 31 | t | t | t | t | > | > msherman | 1000 | t | f | f | f | > | > www-data | 33 | f | f | f | f | > | > (3 rows) > This is strange, though -- the problem types have typowner set > to 103 in pg_type, which is clearly invalid. 103 happens to be > the Linux user ID (in passwd) for the postgres user. Strange. > I suspect this may be a problem with the Debian install scripts; > Debian is forcing postgres' user id to be 31 in the db, since it > used to use a reserved user id for postgres in the os. Either that or a bug in initdb: it *should* substitute the same ID into postgres' pg_shadow entry as it does into the owner columns of the template1 system catalogs. Maybe it's getting confused. Oliver, any thoughts? > 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 ... regards, tom lane